From d91ba5141a7aab2b937264907ce49c8064bb65c4 Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Wed, 12 Mar 2025 15:45:40 +1100 Subject: [PATCH 01/84] Load proof from proof dir when viewing The previous code was creating a new proof object from the spec file (first claim). Instead, the proof needs to be loaded from a file in the proof directory. Note that `APRProver.read_proof` and `APRProver/read_proof_data` have different expectations to how the proof is stored. The latter method has to be used. --- kmir/src/kmir/__main__.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/kmir/src/kmir/__main__.py b/kmir/src/kmir/__main__.py index cf771dfe7..241b218fb 100644 --- a/kmir/src/kmir/__main__.py +++ b/kmir/src/kmir/__main__.py @@ -73,7 +73,6 @@ def __init__( @dataclass class ProveViewOpts(KMirOpts): - spec_file: Path proof_dir: Path | None id: str @@ -140,11 +139,7 @@ def _kmir_prove_run(opts: ProveRunOpts) -> None: def _kmir_prove_view(opts: ProveViewOpts) -> None: kmir = KMIR(HASKELL_DEF_DIR, LLVM_LIB_DIR) - claim_index = kmir.get_claim_index(opts.spec_file) - labels = claim_index.labels(include=[opts.id]) - claim = claim_index[labels[0]] - - proof = APRProof.from_claim(kmir.definition, claim, {}, proof_dir=opts.proof_dir) + proof = APRProof.read_proof_data(opts.proof_dir, opts.id) node_printer = KMIRAPRNodePrinter(kmir, proof) @@ -203,7 +198,6 @@ def _arg_parser() -> ArgumentParser: prove_run_parser.add_argument('--bug-report', metavar='PATH', help='path to optional bug report') prove_view_parser = prove_command_parser.add_parser('view', help='View a saved proof') - prove_view_parser.add_argument('input_file', metavar='SPEC_FILE', help='K File with the spec module') prove_view_parser.add_argument('id', metavar='PROOF_ID', help='The id of the proof to view') prove_view_parser.add_argument('--proof-dir', metavar='PROOF_DIR', help='Proofs folder that can contain the proof') @@ -237,7 +231,7 @@ def _parse_args(args: Sequence[str]) -> KMirOpts: ) case 'view': proof_dir = Path(ns.proof_dir).resolve() if ns.proof_dir is not None else None - return ProveViewOpts(Path(ns.input_file).resolve(), proof_dir, ns.id) + return ProveViewOpts(proof_dir, ns.id) case _: raise AssertionError() case _: From 30d46107aedf722407c10746a60b7702001c6b70 Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Wed, 12 Mar 2025 16:06:32 +1100 Subject: [PATCH 02/84] Add files and description for an example program/proof --- scratch/maximum-proof/README.md | 96 + scratch/maximum-proof/main-max-with-lt.rs | 18 + .../maximum-proof/main-max-with-lt.smir.dot | 135 + .../maximum-proof/main-max-with-lt.smir.json | 2688 +++++++++++++++++ scratch/maximum-proof/maximum-spec.k | 74 + 5 files changed, 3011 insertions(+) create mode 100644 scratch/maximum-proof/README.md create mode 100644 scratch/maximum-proof/main-max-with-lt.rs create mode 100644 scratch/maximum-proof/main-max-with-lt.smir.dot create mode 100644 scratch/maximum-proof/main-max-with-lt.smir.json create mode 100644 scratch/maximum-proof/maximum-spec.k diff --git a/scratch/maximum-proof/README.md b/scratch/maximum-proof/README.md new file mode 100644 index 000000000..b99d90713 --- /dev/null +++ b/scratch/maximum-proof/README.md @@ -0,0 +1,96 @@ +# Turning the max-with-lt program into a property proof + +## Example program that we start from + +```rust +fn main() { + + let a:isize = 42; + let b:isize = -43; + let c:isize = 0; + + let result = maximum(a, b, c); + + assert!(result >= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: isize, b: isize, c: isize) -> isize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} +``` + +We want to prove a property of `maximum`: +- When called with `a`, `b`, and `c`, +- the `result` will be greater or equal all of the arguments, +- and equal to one (or more) of them. + +The `main` program above states this using some concrete values of `a`, `b`, and `c`. We will run this program to construct a general symbolic claim and prove it. + +In a future version, we will be able to start directly with the `maximum` function call and provide symbolic arguments to it. This will save some manual work setting up the claim file and fits the target of proving based on property tests. + +## Extracting Stable MIR for the program + +Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. + +```shell +maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +``` +The Stable MIR for the program can also be rendered as a graph, using the `--dot` option. This creates `main-max-with-lt.smir.dot`. + +```shell +maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +``` +## Constructing the claim by executing `main` to certain points + +1. The program (`main`) reaches the call to `maximum` after 22 steps. + The following command runs it and displays the resulting program state. + + ```shell + maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S + ``` + - Arguments `a`, `b`, and `c` are initialised to `Integer`s as `locals[1]` to `locals[3]` + - A `call` terminator calling function `ty(25)` is executed next (front of the `k` cell) + - The function table contains `ty(25) -> "maximum" code. + - Other state (how `main` continues, its other local variables, and some internal functions) is relevant to the proof we want to perform. +2. The program executes for a total of 92 steps to reach the point where it `return`s from `maximum`. + The following command runs it and displays the resulting program state. + + ```shell + maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S + ``` + - The value `locals[0]` is now set to an `Integer`. This will be the target of our assertions. + - A `return` terminator is executed next (front of the `k` cell), it will return `locals[0]` + - It should be an `Integer` with the desired properties as stated above + +State 1. defines our start state for the claim. Irrelevant parts are elided (replaced by variables). +* The code of the `maximum` function in the `functions` table needs to be kept. We also keep its identifier `ty(25)`. Other functions can be removed (we won't perform a return). +* The `call` terminator is kept, calling `ty(25)` with arguments from `locals[1,2,3]`. `target` is modified to be `noBasicBlockIdx` to force termination of the prover (no block to jump back to). +* The four locals `0` - `3` are required in their original order to provide the function arguments. The values of `a`, `b`, and `c` in locals `1` - `3` are replaced with symbolic variables used in the proof. +* We could keep all other locals but do not have to (however it is important that the list of locals has a known length). +* `main`s other details in `currentFrame` are irrelevant and elided. + + +State 2. is the end state, where all that matters is the returned value. + +* The `locals` list should contain this `?RESULT` value at index `0` +* The `?RESULT` value should have the properties stated (equivalent to the assertion in `main`) +* Because of the modified `target`, the program should end, i.e., have an `#EndProgram` in the `k` cell. + +The above is written as a _claim_ in K framework language into a `maximum-spec.k` file. +Most of the syntax can be copied from the output of the `kmir run` commands above, and irrelevant parts replaced by `_` (LHS) or `?_` (RHS). + +Alternatively, it is possible to construct a claim that the entire rest of the program after initialising the variables will result in the desired `?RESULT`, i.e., the assertion in `main` is executed successfully and the program ends in `#EndProgram` after checking it. This would require more steps. + +## Running the prover on the claim and viewing the proof +```shell +maximum-proof$ poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof +``` + +The proof steps are saved in the `$PWD/proof` directory for later inspection using `kmir prove view`. This is especially important when the proof does _not_ succeed immediately. + +```shell +maximum-proof$ poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof +``` diff --git a/scratch/maximum-proof/main-max-with-lt.rs b/scratch/maximum-proof/main-max-with-lt.rs new file mode 100644 index 000000000..25d54c526 --- /dev/null +++ b/scratch/maximum-proof/main-max-with-lt.rs @@ -0,0 +1,18 @@ + +fn main() { + + let a:isize = 42; + let b:isize = -43; + let c:isize = 0; + + let result = maximum(a, b, c); + + assert!(result >= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: isize, b: isize, c: isize) -> isize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} diff --git a/scratch/maximum-proof/main-max-with-lt.smir.dot b/scratch/maximum-proof/main-max-with-lt.smir.dot new file mode 100644 index 000000000..91359f67b --- /dev/null +++ b/scratch/maximum-proof/main-max-with-lt.smir.dot @@ -0,0 +1,135 @@ +digraph { + label="main_max_with_lt"; + node [shape=rectangle]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X5153bc83e282e268_0 -> X5153bc83e282e268_1 [label="_0"]; + X5153bc83e282e268_0 [label="Call\l"]; + X5153bc83e282e268_1 [label="Return\l"]; + } + X5153bc83e282e268_0 -> X5153bc83e282e268_0: _1 [label=""]; + subgraph cluster_1 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X88af70ac7219a434_0 -> X88af70ac7219a434_1 [label="_5"]; + X88af70ac7219a434_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X88af70ac7219a434_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X88af70ac7219a434_0 -> Xc987e5ecea6cc82b_0 [label="_6,_2,_3,_4"]; + subgraph cluster_2 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + Xf1c2e3e2362b71b1_0 -> Xf1c2e3e2362b71b1_1 [label="_3"]; + Xf1c2e3e2362b71b1_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + Xf1c2e3e2362b71b1_1 -> Xf1c2e3e2362b71b1_2 [label="_2"]; + Xf1c2e3e2362b71b1_1 [label="Storage Dead _4\lCall\l"]; + Xf1c2e3e2362b71b1_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xf1c2e3e2362b71b1_0 -> X83f8b52e3f0ef4c5_0 [label="_4"]; + Xf1c2e3e2362b71b1_1 -> X5c233e009f84aa6c_0 [label="_3"]; + subgraph cluster_3 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X5c233e009f84aa6c_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_4 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_3 [label="Cleanup"]; + X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_1 [label="_0"]; + X58ae416f9afa06ac_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X58ae416f9afa06ac_1 -> X58ae416f9afa06ac_2; + X58ae416f9afa06ac_1 [label="Drop _1\l"]; + X58ae416f9afa06ac_2 [label="Return\l"]; + X58ae416f9afa06ac_3 -> X58ae416f9afa06ac_4; + X58ae416f9afa06ac_3 [label="Drop _1\l"]; + X58ae416f9afa06ac_4 [label="Resume\l"]; + } + X58ae416f9afa06ac_0 -> Xf1c2e3e2362b71b1_0 [label="_3,_2"]; + subgraph cluster_5 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xefb68cd7a0d5be14_0 [label="Return\l"]; + } + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X2aeea2bef42114da_0 -> X2aeea2bef42114da_1 [label="_0"]; + X2aeea2bef42114da_0 [label="Call\l"]; + X2aeea2bef42114da_1 [label="Return\l"]; + } + X2aeea2bef42114da_0 -> X58ae416f9afa06ac_0 [label="_1*,_2"]; + subgraph cluster_7 { + label="maximum"; + style="filled"; + color=palegreen; + X527779074a5fd21e_0 -> X527779074a5fd21e_2 [label="0"]; + X527779074a5fd21e_0 -> X527779074a5fd21e_1 [label="other"]; + X527779074a5fd21e_0 [label="_5 <- Lt(_1, _2)\lSwitchInt _5\l"]; + X527779074a5fd21e_1 -> X527779074a5fd21e_3; + X527779074a5fd21e_1 [label="_4 <- Use(_2)\lGoto\l"]; + X527779074a5fd21e_2 -> X527779074a5fd21e_3; + X527779074a5fd21e_2 [label="_4 <- Use(_1)\lGoto\l"]; + X527779074a5fd21e_3 -> X527779074a5fd21e_5 [label="0"]; + X527779074a5fd21e_3 -> X527779074a5fd21e_4 [label="other"]; + X527779074a5fd21e_3 [label="_7 <- Use(_4)\l_6 <- Lt(_7, _3)\lSwitchInt _6\l"]; + X527779074a5fd21e_4 -> X527779074a5fd21e_6; + X527779074a5fd21e_4 [label="_0 <- Use(_3)\lGoto\l"]; + X527779074a5fd21e_5 -> X527779074a5fd21e_6; + X527779074a5fd21e_5 [label="_0 <- Use(_4)\lGoto\l"]; + X527779074a5fd21e_6 [label="Return\l"]; + } + subgraph cluster_8 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X83f8b52e3f0ef4c5_0 -> X83f8b52e3f0ef4c5_1 [label="_0"]; + X83f8b52e3f0ef4c5_0 [label="Call\l"]; + X83f8b52e3f0ef4c5_1 -> X83f8b52e3f0ef4c5_2 [label="_2"]; + X83f8b52e3f0ef4c5_1 [label="Call\l"]; + X83f8b52e3f0ef4c5_2 [label="Return\l"]; + } + X83f8b52e3f0ef4c5_0 -> X5153bc83e282e268_0 [label="_1,const :: ()"]; + X83f8b52e3f0ef4c5_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_9 { + label="main"; + style="filled"; + color=palegreen; + X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="_4"]; + X37252ea5c5b3ce2a_0 [label="_1 <- Use(const :: isize)\l_2 <- Use(const :: isize)\l_3 <- Use(const :: isize)\lCall\l"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; + X37252ea5c5b3ce2a_1 [label="_5 <- Ge(_4, _1)\lSwitchInt _5\l"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; + X37252ea5c5b3ce2a_2 [label="_6 <- Ge(_4, _2)\lSwitchInt _6\l"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; + X37252ea5c5b3ce2a_3 [label="_7 <- Ge(_4, _3)\lSwitchInt _7\l"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_4 [label="_8 <- Eq(_4, _1)\lSwitchInt _8\l"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_5 [label="_9 <- Eq(_4, _2)\lSwitchInt _9\l"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_6 [label="_10 <- Eq(_4, _3)\lSwitchInt _10\l"]; + X37252ea5c5b3ce2a_7 [label="Call\l"]; + X37252ea5c5b3ce2a_8 [label="Return\l"]; + } + X37252ea5c5b3ce2a_0 -> X527779074a5fd21e_0 [label="_1,_2,_3"]; + X37252ea5c5b3ce2a_7 -> Xac08878333d72e42_0 [label="const :: &str"]; +} diff --git a/scratch/maximum-proof/main-max-with-lt.smir.json b/scratch/maximum-proof/main-max-with-lt.smir.json new file mode 100644 index 000000000..21f456de7 --- /dev/null +++ b/scratch/maximum-proof/main-max-with-lt.smir.json @@ -0,0 +1,2688 @@ +{ + "name": "main_max_with_lt", + "crate_id": 5373935543796547206, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 97, + 32, + 38, + 38, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 98, + 32, + 38, + 38, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 99, + 32, + 38, + 38, + 10, + 32, + 32, + 32, + 32, + 40, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 97, + 32, + 124, + 124, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 98, + 32, + 124, + 124, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 99, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E" + } + ], + [ + 25, + { + "NormalSym": "_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE" + } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h8f98b99a20edb596E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 6, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 213, + 255, + 255, + 255, + 255, + 255, + 255, + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 6, + "id": 11 + } + } + } + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 6, + "id": 12 + } + } + } + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 2 + } + } + }, + "span": 55 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 3 + } + } + }, + "span": 56 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 57 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 4 + } + } + }, + "span": 57 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 8, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 8 + } + } + }, + "span": 58 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 59 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 9, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 8 + } + } + }, + "span": 59 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 60 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 10, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 8 + } + } + }, + "span": 60 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 13 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 14 + } + } + } + ], + "destination": { + "local": 11, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 6, + "span": 64, + "mutability": "Not" + }, + { + "ty": 6, + "span": 65, + "mutability": "Not" + }, + { + "ty": 6, + "span": 66, + "mutability": "Not" + }, + { + "ty": 6, + "span": 67, + "mutability": "Not" + }, + { + "ty": 28, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 59, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 61, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 64, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 65, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 66, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 67, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "maximum", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 69 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "span": 71 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 70 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 70 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 7, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 73 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 + } + } + }, + "span": 73 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 3, + "projection": [] + } + } + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 75 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 77 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 75 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 6, + "span": 80, + "mutability": "Not" + }, + { + "ty": 6, + "span": 81, + "mutability": "Not" + }, + { + "ty": 6, + "span": 82, + "mutability": "Not" + }, + { + "ty": 6, + "span": 83, + "mutability": "Not" + }, + { + "ty": 28, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 6, + "span": 74, + "mutability": "Mut" + } + ], + "arg_count": 3, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 80, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "c", + "source_info": { + "span": 82, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "max_ab", + "source_info": { + "span": 83, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h739869090782dad0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hd99c80c4d0898bdeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 28, + { + "RigidTy": "Bool" + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ] + ], + "debug": null +} \ No newline at end of file diff --git a/scratch/maximum-proof/maximum-spec.k b/scratch/maximum-proof/maximum-spec.k new file mode 100644 index 000000000..4474fac6e --- /dev/null +++ b/scratch/maximum-proof/maximum-spec.k @@ -0,0 +1,74 @@ +module MAXIMUM-SPEC + imports KMIR + + claim [maximum-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 50 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 25 ) , // <- this is the reference to `maximum` + id: mirConstId ( 9 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 25 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 64 , false ) , ty ( 6 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 64 , false ) , ty ( 6 ) , _ ) ) + ListItem ( typedLocal ( Integer ( C , 64 , false ) , ty ( 6 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 64, false), ty ( 6 ) , ?_ )) + ?_ + + + _ => ?_ + + (ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) + ) + + + requires // invariant of the `Integer` constructor + 0 <=Int A + andBool A Date: Wed, 12 Mar 2025 16:27:26 +1100 Subject: [PATCH 03/84] make proof-dir required for kmir prove view command --- kmir/src/kmir/__main__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kmir/src/kmir/__main__.py b/kmir/src/kmir/__main__.py index 241b218fb..ca30e6712 100644 --- a/kmir/src/kmir/__main__.py +++ b/kmir/src/kmir/__main__.py @@ -73,7 +73,7 @@ def __init__( @dataclass class ProveViewOpts(KMirOpts): - proof_dir: Path | None + proof_dir: Path id: str @@ -199,7 +199,9 @@ def _arg_parser() -> ArgumentParser: prove_view_parser = prove_command_parser.add_parser('view', help='View a saved proof') prove_view_parser.add_argument('id', metavar='PROOF_ID', help='The id of the proof to view') - prove_view_parser.add_argument('--proof-dir', metavar='PROOF_DIR', help='Proofs folder that can contain the proof') + prove_view_parser.add_argument( + '--proof-dir', required=True, metavar='PROOF_DIR', help='Proofs folder that can contain the proof' + ) return parser @@ -230,7 +232,7 @@ def _parse_args(args: Sequence[str]) -> KMirOpts: bug_report=ns.bug_report, ) case 'view': - proof_dir = Path(ns.proof_dir).resolve() if ns.proof_dir is not None else None + proof_dir = Path(ns.proof_dir).resolve() return ProveViewOpts(proof_dir, ns.id) case _: raise AssertionError() From 9082e00abaad0a6aaca777c148cf0c754194c2de Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Thu, 20 Mar 2025 14:06:29 +1100 Subject: [PATCH 04/84] Use `usize` in source code for consistency --- scratch/maximum-proof/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scratch/maximum-proof/README.md b/scratch/maximum-proof/README.md index b99d90713..ea565f7bf 100644 --- a/scratch/maximum-proof/README.md +++ b/scratch/maximum-proof/README.md @@ -5,9 +5,9 @@ ```rust fn main() { - let a:isize = 42; - let b:isize = -43; - let c:isize = 0; + let a:usize = 42; + let b:usize = -43; + let c:usize = 0; let result = maximum(a, b, c); @@ -15,7 +15,7 @@ fn main() { && (result == a || result == b || result == c ) ); } -fn maximum(a: isize, b: isize, c: isize) -> isize { +fn maximum(a: usize, b: usize, c: usize) -> usize { // max(a, max(b, c)) let max_ab = if a < b {b} else {a}; if max_ab < c {c} else {max_ab} From f992c9dea247792d4ad97e5c829e1ff644b219c1 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 17:19:39 -0300 Subject: [PATCH 05/84] Adding unchecked specs --- .../maximum-proof/main-max-with-lt.smir.dot | 166 +- .../maximum-proof/main-max-with-lt.smir.json | 2689 +---------------- scratch/unchecked_add/unchecked-add.rs | 14 + scratch/unchecked_add/unchecked-add.smir.dot | 140 + scratch/unchecked_add/unchecked-add.smir.json | 1 + scratch/unchecked_add/unchecked-op-spec.k | 74 + scratch/unchecked_mul/unchecked-mul.rs | 14 + scratch/unchecked_mul/unchecked-mul.smir.dot | 140 + scratch/unchecked_mul/unchecked-mul.smir.json | 1 + scratch/unchecked_mul/unchecked-op-spec.k | 74 + scratch/unchecked_neg/unchecked-neg.rs | 12 + scratch/unchecked_neg/unchecked-neg.smir.dot | 137 + scratch/unchecked_neg/unchecked-neg.smir.json | 1 + scratch/unchecked_neg/unchecked-op-spec.k | 72 + scratch/unchecked_shl/unchecked-op-spec.k | 74 + scratch/unchecked_shl/unchecked-shl.rs | 13 + scratch/unchecked_shl/unchecked-shl.smir.dot | 127 + scratch/unchecked_shl/unchecked-shl.smir.json | 1 + scratch/unchecked_shr/unchecked-op-spec.k | 74 + scratch/unchecked_shr/unchecked-shr.rs | 13 + scratch/unchecked_shr/unchecked-shr.smir.dot | 127 + scratch/unchecked_shr/unchecked-shr.smir.json | 1 + scratch/unchecked_sub/unchecked-op-spec.k | 74 + scratch/unchecked_sub/unchecked-sub.rs | 14 + scratch/unchecked_sub/unchecked-sub.smir.dot | 140 + scratch/unchecked_sub/unchecked-sub.smir.json | 1 + 26 files changed, 1423 insertions(+), 2771 deletions(-) create mode 100644 scratch/unchecked_add/unchecked-add.rs create mode 100644 scratch/unchecked_add/unchecked-add.smir.dot create mode 100644 scratch/unchecked_add/unchecked-add.smir.json create mode 100644 scratch/unchecked_add/unchecked-op-spec.k create mode 100644 scratch/unchecked_mul/unchecked-mul.rs create mode 100644 scratch/unchecked_mul/unchecked-mul.smir.dot create mode 100644 scratch/unchecked_mul/unchecked-mul.smir.json create mode 100644 scratch/unchecked_mul/unchecked-op-spec.k create mode 100644 scratch/unchecked_neg/unchecked-neg.rs create mode 100644 scratch/unchecked_neg/unchecked-neg.smir.dot create mode 100644 scratch/unchecked_neg/unchecked-neg.smir.json create mode 100644 scratch/unchecked_neg/unchecked-op-spec.k create mode 100644 scratch/unchecked_shl/unchecked-op-spec.k create mode 100644 scratch/unchecked_shl/unchecked-shl.rs create mode 100644 scratch/unchecked_shl/unchecked-shl.smir.dot create mode 100644 scratch/unchecked_shl/unchecked-shl.smir.json create mode 100644 scratch/unchecked_shr/unchecked-op-spec.k create mode 100644 scratch/unchecked_shr/unchecked-shr.rs create mode 100644 scratch/unchecked_shr/unchecked-shr.smir.dot create mode 100644 scratch/unchecked_shr/unchecked-shr.smir.json create mode 100644 scratch/unchecked_sub/unchecked-op-spec.k create mode 100644 scratch/unchecked_sub/unchecked-sub.rs create mode 100644 scratch/unchecked_sub/unchecked-sub.smir.dot create mode 100644 scratch/unchecked_sub/unchecked-sub.smir.json diff --git a/scratch/maximum-proof/main-max-with-lt.smir.dot b/scratch/maximum-proof/main-max-with-lt.smir.dot index 91359f67b..d6a136c47 100644 --- a/scratch/maximum-proof/main-max-with-lt.smir.dot +++ b/scratch/maximum-proof/main-max-with-lt.smir.dot @@ -1,77 +1,85 @@ digraph { label="main_max_with_lt"; node [shape=rectangle]; - Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; subgraph cluster_0 { - label=">::ca\nll_once"; + label="std::rt::lang_start::<()>\n::{closure#0}"; style="filled"; color=lightgray; - X5153bc83e282e268_0 -> X5153bc83e282e268_1 [label="_0"]; - X5153bc83e282e268_0 [label="Call\l"]; - X5153bc83e282e268_1 [label="Return\l"]; + Xb022926f55be7915_0 -> Xb022926f55be7915_1 [label="_3"]; + Xb022926f55be7915_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + Xb022926f55be7915_1 -> Xb022926f55be7915_2 [label="_2"]; + Xb022926f55be7915_1 [label="Storage Dead _4\lCall\l"]; + Xb022926f55be7915_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; } - X5153bc83e282e268_0 -> X5153bc83e282e268_0: _1 [label=""]; + Xb022926f55be7915_0 -> X86cc23a99438eb2_0 [label="_4"]; + Xb022926f55be7915_1 -> X20f17eb946604891_0 [label="_3"]; subgraph cluster_1 { - label="std::rt::lang_start::<()>"; + label="<() \nas \nstd::process::Termination\n>::report"; style="filled"; color=lightgray; - X88af70ac7219a434_0 -> X88af70ac7219a434_1 [label="_5"]; - X88af70ac7219a434_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X88af70ac7219a434_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + X20f17eb946604891_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; } - X88af70ac7219a434_0 -> Xc987e5ecea6cc82b_0 [label="_6,_2,_3,_4"]; subgraph cluster_2 { - label="std::rt::lang_start::<()>\n::{closure#0}"; + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; style="filled"; color=lightgray; - Xf1c2e3e2362b71b1_0 -> Xf1c2e3e2362b71b1_1 [label="_3"]; - Xf1c2e3e2362b71b1_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - Xf1c2e3e2362b71b1_1 -> Xf1c2e3e2362b71b1_2 [label="_2"]; - Xf1c2e3e2362b71b1_1 [label="Storage Dead _4\lCall\l"]; - Xf1c2e3e2362b71b1_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_3 [label="Cleanup"]; + Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_1 [label="_0"]; + Xda86ab50b6674bf3_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xda86ab50b6674bf3_1 -> Xda86ab50b6674bf3_2; + Xda86ab50b6674bf3_1 [label="Drop _1\l"]; + Xda86ab50b6674bf3_2 [label="Return\l"]; + Xda86ab50b6674bf3_3 -> Xda86ab50b6674bf3_4; + Xda86ab50b6674bf3_3 [label="Drop _1\l"]; + Xda86ab50b6674bf3_4 [label="Resume\l"]; } - Xf1c2e3e2362b71b1_0 -> X83f8b52e3f0ef4c5_0 [label="_4"]; - Xf1c2e3e2362b71b1_1 -> X5c233e009f84aa6c_0 [label="_3"]; + Xda86ab50b6674bf3_0 -> Xb022926f55be7915_0 [label="_3,_2"]; subgraph cluster_3 { - label="<() \nas \nstd::process::Termination\n>::report"; + label="main"; style="filled"; - color=lightgray; - X5c233e009f84aa6c_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + color=palegreen; + X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="_4"]; + X37252ea5c5b3ce2a_0 [label="_1 <- Use(const :: isize)\l_2 <- Use(const :: isize)\l_3 <- Use(const :: isize)\lCall\l"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; + X37252ea5c5b3ce2a_1 [label="_5 <- Ge(_4, _1)\lSwitchInt _5\l"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; + X37252ea5c5b3ce2a_2 [label="_6 <- Ge(_4, _2)\lSwitchInt _6\l"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; + X37252ea5c5b3ce2a_3 [label="_7 <- Ge(_4, _3)\lSwitchInt _7\l"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_4 [label="_8 <- Eq(_4, _1)\lSwitchInt _8\l"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_5 [label="_9 <- Eq(_4, _2)\lSwitchInt _9\l"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_6 [label="_10 <- Eq(_4, _3)\lSwitchInt _10\l"]; + X37252ea5c5b3ce2a_7 [label="Call\l"]; + X37252ea5c5b3ce2a_8 [label="Return\l"]; } + X37252ea5c5b3ce2a_0 -> X527779074a5fd21e_0 [label="_1,_2,_3"]; + X37252ea5c5b3ce2a_7 -> X210a8e5fe9313c81_0 [label="const :: &str"]; subgraph cluster_4 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; style="filled"; color=lightgray; - X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_3 [label="Cleanup"]; - X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_1 [label="_0"]; - X58ae416f9afa06ac_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X58ae416f9afa06ac_1 -> X58ae416f9afa06ac_2; - X58ae416f9afa06ac_1 [label="Drop _1\l"]; - X58ae416f9afa06ac_2 [label="Return\l"]; - X58ae416f9afa06ac_3 -> X58ae416f9afa06ac_4; - X58ae416f9afa06ac_3 [label="Drop _1\l"]; - X58ae416f9afa06ac_4 [label="Resume\l"]; + X86cc23a99438eb2_0 -> X86cc23a99438eb2_1 [label="_0"]; + X86cc23a99438eb2_0 [label="Call\l"]; + X86cc23a99438eb2_1 -> X86cc23a99438eb2_2 [label="_2"]; + X86cc23a99438eb2_1 [label="Call\l"]; + X86cc23a99438eb2_2 [label="Return\l"]; } - X58ae416f9afa06ac_0 -> Xf1c2e3e2362b71b1_0 [label="_3,_2"]; + X86cc23a99438eb2_0 -> X2a67ec2487cf8e32_0 [label="_1,const :: ()"]; + X86cc23a99438eb2_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; subgraph cluster_5 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xefb68cd7a0d5be14_0 [label="Return\l"]; - } - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X2aeea2bef42114da_0 -> X2aeea2bef42114da_1 [label="_0"]; - X2aeea2bef42114da_0 [label="Call\l"]; - X2aeea2bef42114da_1 [label="Return\l"]; - } - X2aeea2bef42114da_0 -> X58ae416f9afa06ac_0 [label="_1*,_2"]; - subgraph cluster_7 { label="maximum"; style="filled"; color=palegreen; @@ -91,45 +99,37 @@ digraph { X527779074a5fd21e_5 [label="_0 <- Use(_4)\lGoto\l"]; X527779074a5fd21e_6 [label="Return\l"]; } + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X34679ac96970715e_0 -> X34679ac96970715e_1 [label="_0"]; + X34679ac96970715e_0 [label="Call\l"]; + X34679ac96970715e_1 [label="Return\l"]; + } + X34679ac96970715e_0 -> Xda86ab50b6674bf3_0 [label="_1*,_2"]; + subgraph cluster_7 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xb149796b83f1b2e4_0 [label="Return\l"]; + } subgraph cluster_8 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + label="std::rt::lang_start::<()>"; style="filled"; color=lightgray; - X83f8b52e3f0ef4c5_0 -> X83f8b52e3f0ef4c5_1 [label="_0"]; - X83f8b52e3f0ef4c5_0 [label="Call\l"]; - X83f8b52e3f0ef4c5_1 -> X83f8b52e3f0ef4c5_2 [label="_2"]; - X83f8b52e3f0ef4c5_1 [label="Call\l"]; - X83f8b52e3f0ef4c5_2 [label="Return\l"]; + Xc8323e8e5ef1862e_0 -> Xc8323e8e5ef1862e_1 [label="_5"]; + Xc8323e8e5ef1862e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + Xc8323e8e5ef1862e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; } - X83f8b52e3f0ef4c5_0 -> X5153bc83e282e268_0 [label="_1,const :: ()"]; - X83f8b52e3f0ef4c5_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + Xc8323e8e5ef1862e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; subgraph cluster_9 { - label="main"; + label=">::ca\nll_once"; style="filled"; - color=palegreen; - X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="_4"]; - X37252ea5c5b3ce2a_0 [label="_1 <- Use(const :: isize)\l_2 <- Use(const :: isize)\l_3 <- Use(const :: isize)\lCall\l"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; - X37252ea5c5b3ce2a_1 [label="_5 <- Ge(_4, _1)\lSwitchInt _5\l"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; - X37252ea5c5b3ce2a_2 [label="_6 <- Ge(_4, _2)\lSwitchInt _6\l"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; - X37252ea5c5b3ce2a_3 [label="_7 <- Ge(_4, _3)\lSwitchInt _7\l"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_4 [label="_8 <- Eq(_4, _1)\lSwitchInt _8\l"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_5 [label="_9 <- Eq(_4, _2)\lSwitchInt _9\l"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_6 [label="_10 <- Eq(_4, _3)\lSwitchInt _10\l"]; - X37252ea5c5b3ce2a_7 [label="Call\l"]; - X37252ea5c5b3ce2a_8 [label="Return\l"]; + color=lightgray; + X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_1 [label="_0"]; + X2a67ec2487cf8e32_0 [label="Call\l"]; + X2a67ec2487cf8e32_1 [label="Return\l"]; } - X37252ea5c5b3ce2a_0 -> X527779074a5fd21e_0 [label="_1,_2,_3"]; - X37252ea5c5b3ce2a_7 -> Xac08878333d72e42_0 [label="const :: &str"]; + X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_0: _1 [label=""]; } diff --git a/scratch/maximum-proof/main-max-with-lt.smir.json b/scratch/maximum-proof/main-max-with-lt.smir.json index 21f456de7..847684ef6 100644 --- a/scratch/maximum-proof/main-max-with-lt.smir.json +++ b/scratch/maximum-proof/main-max-with-lt.smir.json @@ -1,2688 +1 @@ -{ - "name": "main_max_with_lt", - "crate_id": 5373935543796547206, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 97, - 32, - 38, - 38, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 98, - 32, - 38, - 38, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 99, - 32, - 38, - 38, - 10, - 32, - 32, - 32, - 32, - 40, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 97, - 32, - 124, - 124, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 98, - 32, - 124, - 124, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 99, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E" - } - ], - [ - 25, - { - "NormalSym": "_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE" - } - ], - [ - 26, - { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h8f98b99a20edb596E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 6, - "id": 10 - } - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 213, - 255, - 255, - 255, - 255, - 255, - 255, - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 6, - "id": 11 - } - } - } - } - ] - }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 6, - "id": 12 - } - } - } - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 2 - } - } - }, - "span": 55 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 3 - } - } - }, - "span": 56 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 4 - } - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 58 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 8, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 8 - } - } - }, - "span": 58 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 9, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 8 - } - } - }, - "span": 59 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 60 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 10, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 8 - } - } - }, - "span": 60 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 13 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 110, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 14 - } - } - } - ], - "destination": { - "local": 11, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 6, - "span": 64, - "mutability": "Not" - }, - { - "ty": 6, - "span": 65, - "mutability": "Not" - }, - { - "ty": 6, - "span": 66, - "mutability": "Not" - }, - { - "ty": 6, - "span": 67, - "mutability": "Not" - }, - { - "ty": 28, - "span": 55, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 59, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 61, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 64, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 65, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 66, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 67, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE", - "mono_item_kind": { - "MonoItemFn": { - "name": "maximum", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 69 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [] - } - } - } - ] - }, - "span": 71 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } - }, - "span": 70 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } - }, - "span": 70 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 7, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 73 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 4 - } - } - }, - "span": 73 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "span": 76 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 75 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "span": 77 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 75 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 79, - "mutability": "Mut" - }, - { - "ty": 6, - "span": 80, - "mutability": "Not" - }, - { - "ty": 6, - "span": 81, - "mutability": "Not" - }, - { - "ty": 6, - "span": 82, - "mutability": "Not" - }, - { - "ty": 6, - "span": 83, - "mutability": "Not" - }, - { - "ty": 28, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 6, - "span": 74, - "mutability": "Mut" - } - ], - "arg_count": 3, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "c", - "source_info": { - "span": 82, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "max_ab", - "source_info": { - "span": 83, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 84 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h739869090782dad0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hd99c80c4d0898bdeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] - } - }, - "details": null - } - ], - "types": [ - [ - 28, - { - "RigidTy": "Bool" - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ] - ], - "debug": null -} \ No newline at end of file +{"name":"main_max_with_lt","crate_id":5373935543796547206,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116,32,62,61,32,97,32,38,38,32,114,101,115,117,108,116,32,62,61,32,98,32,38,38,32,114,101,115,117,108,116,32,62,61,32,99,32,38,38,10,32,32,32,32,40,114,101,115,117,108,116,32,61,61,32,97,32,124,124,32,114,101,115,117,108,116,32,61,61,32,98,32,124,124,32,114,101,115,117,108,116,32,61,61,32,99,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[30,{"NoOpSym":""}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE"}],[25,{"NormalSym":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE","mono_item_kind":{"MonoItemFn":{"name":"maximum","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":69}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":69}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[]}}}]},"span":71}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[]}}}]},"span":72}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":74},{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":7,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":73}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":4}}},"span":73}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":3,"projection":[]}}}]},"span":76}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":77}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[],"terminator":{"kind":"Return","span":78}}],"locals":[{"ty":6,"span":79,"mutability":"Mut"},{"ty":6,"span":80,"mutability":"Not"},{"ty":6,"span":81,"mutability":"Not"},{"ty":6,"span":82,"mutability":"Not"},{"ty":6,"span":83,"mutability":"Not"},{"ty":28,"span":69,"mutability":"Mut"},{"ty":28,"span":73,"mutability":"Mut"},{"ty":6,"span":74,"mutability":"Mut"}],"arg_count":3,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":81,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"c","source_info":{"span":82,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"max_ab","source_info":{"span":83,"scope":1},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":84}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN16main_max_with_lt4main17h96bac61ef98236a2E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255,255,255,255,255,255,255],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":11}}}}]},"span":53},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":12}}}}]},"span":54}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}},{"Copy":{"local":3,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":1,"unwind":"Continue"}},"span":51}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":2}}},"span":55}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":3}}},"span":56}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":57}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":4}}},"span":57}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":8,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":8}}},"span":58}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":59}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":9,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":8}}},"span":59}},{"statements":[{"kind":{"Assign":[{"local":10,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":60}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":10,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":8}}},"span":60}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":61,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":13}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":14}}}],"destination":{"local":11,"projection":[]},"target":null,"unwind":"Continue"}},"span":61}},{"statements":[],"terminator":{"kind":"Return","span":62}}],"locals":[{"ty":1,"span":63,"mutability":"Mut"},{"ty":6,"span":64,"mutability":"Not"},{"ty":6,"span":65,"mutability":"Not"},{"ty":6,"span":66,"mutability":"Not"},{"ty":6,"span":67,"mutability":"Not"},{"ty":28,"span":55,"mutability":"Mut"},{"ty":28,"span":56,"mutability":"Mut"},{"ty":28,"span":57,"mutability":"Mut"},{"ty":28,"span":58,"mutability":"Mut"},{"ty":28,"span":59,"mutability":"Mut"},{"ty":28,"span":60,"mutability":"Mut"},{"ty":29,"span":61,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":64,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":65,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":66,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":67,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17he1705726abca17eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h563c9dfa7d67f6e6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5364b7b343208af1E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[28,{"RigidTy":"Bool"}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_add/unchecked-add.rs b/scratch/unchecked_add/unchecked-add.rs new file mode 100644 index 000000000..8407e0e2c --- /dev/null +++ b/scratch/unchecked_add/unchecked-add.rs @@ -0,0 +1,14 @@ + +fn main() { + let a:i16 = 42; + let b:i16 = -43; + + let result = unchecked_op(a, b); + + assert!((a + b < i16::MAX) && (a + b > i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_add(b) }; + unchecked_res +} diff --git a/scratch/unchecked_add/unchecked-add.smir.dot b/scratch/unchecked_add/unchecked-add.smir.dot new file mode 100644 index 000000000..079803cdd --- /dev/null +++ b/scratch/unchecked_add/unchecked-add.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_add"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + subgraph cluster_0 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_1 [label="_0"]; + Xecf30c325a77cae0_0 [label="Call\l"]; + Xecf30c325a77cae0_1 [label="Return\l"]; + } + Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_0: _1 [label=""]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xf28f42e91011344a_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X4f9055e3140841d0_0 -> X4f9055e3140841d0_1 [label="_5"]; + X4f9055e3140841d0_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X4f9055e3140841d0_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X4f9055e3140841d0_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_3 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X3d323724ddeb8015_0 -> X3d323724ddeb8015_1 [label="_0"]; + X3d323724ddeb8015_0 [label="Call\l"]; + X3d323724ddeb8015_1 -> X3d323724ddeb8015_2 [label="_2"]; + X3d323724ddeb8015_1 [label="Call\l"]; + X3d323724ddeb8015_2 [label="Return\l"]; + } + X3d323724ddeb8015_0 -> Xecf30c325a77cae0_0 [label="_1,const :: ()"]; + X3d323724ddeb8015_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_4 { + label="main"; + style="filled"; + color=palegreen; + X899bfc87e7e82e90_0 -> X899bfc87e7e82e90_1 [label="_3"]; + X899bfc87e7e82e90_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + X899bfc87e7e82e90_1 -> X899bfc87e7e82e90_2; + X899bfc87e7e82e90_1 [label="_6 <- chkd-Add(_1, _2)\lAssert _6.1 == false\l"]; + X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_6 [label="0"]; + X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_3 [label="other"]; + X899bfc87e7e82e90_2 [label="_5 <- Use(_6.0)\l_4 <- Lt(_5, const :: i16)\lSwitchInt _4\l"]; + X899bfc87e7e82e90_3 -> X899bfc87e7e82e90_4; + X899bfc87e7e82e90_3 [label="_9 <- chkd-Add(_1, _2)\lAssert _9.1 == false\l"]; + X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_6 [label="0"]; + X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_5 [label="other"]; + X899bfc87e7e82e90_4 [label="_8 <- Use(_9.0)\l_7 <- Gt(_8, const :: i16)\lSwitchInt _7\l"]; + X899bfc87e7e82e90_5 [label="Return\l"]; + X899bfc87e7e82e90_6 [label="Call\l"]; + } + X899bfc87e7e82e90_0 -> X7464f1e6ba435b2a_0 [label="_1,_2"]; + X899bfc87e7e82e90_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_5 { + label="core::num::::unchecked_add::prec\nondition_check"; + style="filled"; + color=lightgray; + X3f7834dda050e10_0 -> X3f7834dda050e10_2 [label="0"]; + X3f7834dda050e10_0 -> X3f7834dda050e10_1 [label="other"]; + X3f7834dda050e10_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Add(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + X3f7834dda050e10_1 [label="Call\l"]; + X3f7834dda050e10_2 [label="Return\l"]; + } + X3f7834dda050e10_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_3 [label="Cleanup"]; + Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_1 [label="_0"]; + Xade51bc3a8f52008_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xade51bc3a8f52008_1 -> Xade51bc3a8f52008_2; + Xade51bc3a8f52008_1 [label="Drop _1\l"]; + Xade51bc3a8f52008_2 [label="Return\l"]; + Xade51bc3a8f52008_3 -> Xade51bc3a8f52008_4; + Xade51bc3a8f52008_3 [label="Drop _1\l"]; + Xade51bc3a8f52008_4 [label="Resume\l"]; + } + Xade51bc3a8f52008_0 -> X48be982d2a4cc59b_0 [label="_3,_2"]; + subgraph cluster_7 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X9c80f3743f4f0c10_0 -> X9c80f3743f4f0c10_1 [label="_0"]; + X9c80f3743f4f0c10_0 [label="Call\l"]; + X9c80f3743f4f0c10_1 [label="Return\l"]; + } + X9c80f3743f4f0c10_0 -> Xade51bc3a8f52008_0 [label="_1*,_2"]; + subgraph cluster_8 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X7464f1e6ba435b2a_0 -> X7464f1e6ba435b2a_1 [label="_0"]; + X7464f1e6ba435b2a_0 [label="Call\l"]; + X7464f1e6ba435b2a_1 [label="Return\l"]; + } + X7464f1e6ba435b2a_0 -> X354cc96a778c463_0 [label="_1,_2"]; + subgraph cluster_9 { + label="core::num::::unchecked_add"; + style="filled"; + color=lightgray; + X354cc96a778c463_0 -> X354cc96a778c463_2 [label="0"]; + X354cc96a778c463_0 -> X354cc96a778c463_1 [label="other"]; + X354cc96a778c463_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + X354cc96a778c463_1 -> X354cc96a778c463_2 [label="_4"]; + X354cc96a778c463_1 [label="Call\l"]; + X354cc96a778c463_2 [label="Storage Dead _3\l_0 <- AddUnchecked(_1, _2)\lReturn\l"]; + } + X354cc96a778c463_1 -> X3f7834dda050e10_0 [label="_1,_2"]; + subgraph cluster_10 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X5f7c0242b1a5f905_0 [label="Return\l"]; + } + subgraph cluster_11 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X48be982d2a4cc59b_0 -> X48be982d2a4cc59b_1 [label="_3"]; + X48be982d2a4cc59b_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X48be982d2a4cc59b_1 -> X48be982d2a4cc59b_2 [label="_2"]; + X48be982d2a4cc59b_1 [label="Storage Dead _4\lCall\l"]; + X48be982d2a4cc59b_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X48be982d2a4cc59b_0 -> X3d323724ddeb8015_0 [label="_4"]; + X48be982d2a4cc59b_1 -> Xf28f42e91011344a_0 [label="_3"]; +} diff --git a/scratch/unchecked_add/unchecked-add.smir.json b/scratch/unchecked_add/unchecked-add.smir.json new file mode 100644 index 000000000..d98f99eae --- /dev/null +++ b/scratch/unchecked_add/unchecked-add.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_add","crate_id":1100512358528492573,"allocs":[[2,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,97,100,100,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,43,32,98,32,60,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,43,32,98,32,62,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E"}],[35,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[32,{"NormalSym":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha7140c6faa1714efE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN13unchecked_add4main17hd8e1c5b7245124d4E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["AddUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_add/unchecked-op-spec.k b/scratch/unchecked_add/unchecked-op-spec.k new file mode 100644 index 000000000..afe7e0fb4 --- /dev/null +++ b/scratch/unchecked_add/unchecked-op-spec.k @@ -0,0 +1,74 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + (ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 - (1 < i16::MAX) && (a * b < i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_mul(b) }; + unchecked_res +} diff --git a/scratch/unchecked_mul/unchecked-mul.smir.dot b/scratch/unchecked_mul/unchecked-mul.smir.dot new file mode 100644 index 000000000..1fd26d6eb --- /dev/null +++ b/scratch/unchecked_mul/unchecked-mul.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_mul"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X8f01db0e36395c71_0 -> X8f01db0e36395c71_1 [label="_0"]; + X8f01db0e36395c71_0 [label="Call\l"]; + X8f01db0e36395c71_1 [label="Return\l"]; + } + X8f01db0e36395c71_0 -> X8f01db0e36395c71_0: _1 [label=""]; + subgraph cluster_1 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X9e222efa6b726605_0 [label="Return\l"]; + } + subgraph cluster_2 { + label="core::num::::unchecked_mul"; + style="filled"; + color=lightgray; + Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_2 [label="0"]; + Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_1 [label="other"]; + Xeba6f5d5a379e29a_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xeba6f5d5a379e29a_1 -> Xeba6f5d5a379e29a_2 [label="_4"]; + Xeba6f5d5a379e29a_1 [label="Call\l"]; + Xeba6f5d5a379e29a_2 [label="Storage Dead _3\l_0 <- MulUnchecked(_1, _2)\lReturn\l"]; + } + Xeba6f5d5a379e29a_1 -> X9b97bece994ebb51_0 [label="_1,_2"]; + subgraph cluster_3 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X62f87ed0bcd6b426_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_4 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X69af4523a03742d5_0 -> X69af4523a03742d5_1 [label="_3"]; + X69af4523a03742d5_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X69af4523a03742d5_1 -> X69af4523a03742d5_2 [label="_2"]; + X69af4523a03742d5_1 [label="Storage Dead _4\lCall\l"]; + X69af4523a03742d5_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X69af4523a03742d5_0 -> Xcb8fb0027af607b6_0 [label="_4"]; + X69af4523a03742d5_1 -> X62f87ed0bcd6b426_0 [label="_3"]; + subgraph cluster_5 { + label="core::num::::unchecked_mul::prec\nondition_check"; + style="filled"; + color=lightgray; + X9b97bece994ebb51_0 -> X9b97bece994ebb51_2 [label="0"]; + X9b97bece994ebb51_0 -> X9b97bece994ebb51_1 [label="other"]; + X9b97bece994ebb51_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Mul(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + X9b97bece994ebb51_1 [label="Call\l"]; + X9b97bece994ebb51_2 [label="Return\l"]; + } + X9b97bece994ebb51_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X797ddd37b7ea3b5e_0 -> X797ddd37b7ea3b5e_1 [label="_5"]; + X797ddd37b7ea3b5e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X797ddd37b7ea3b5e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X797ddd37b7ea3b5e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_7 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + Xcb8fb0027af607b6_0 -> Xcb8fb0027af607b6_1 [label="_0"]; + Xcb8fb0027af607b6_0 [label="Call\l"]; + Xcb8fb0027af607b6_1 -> Xcb8fb0027af607b6_2 [label="_2"]; + Xcb8fb0027af607b6_1 [label="Call\l"]; + Xcb8fb0027af607b6_2 [label="Return\l"]; + } + Xcb8fb0027af607b6_0 -> X8f01db0e36395c71_0 [label="_1,const :: ()"]; + Xcb8fb0027af607b6_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_8 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X201617fc87c04742_0 -> X201617fc87c04742_1 [label="_0"]; + X201617fc87c04742_0 [label="Call\l"]; + X201617fc87c04742_1 [label="Return\l"]; + } + X201617fc87c04742_0 -> X86afcabc1ac42f91_0 [label="_1*,_2"]; + subgraph cluster_9 { + label="main"; + style="filled"; + color=palegreen; + Xe63d82c3b46f3acf_0 -> Xe63d82c3b46f3acf_1 [label="_3"]; + Xe63d82c3b46f3acf_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + Xe63d82c3b46f3acf_1 -> Xe63d82c3b46f3acf_2; + Xe63d82c3b46f3acf_1 [label="_6 <- chkd-Mul(_1, _2)\lAssert _6.1 == false\l"]; + Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_6 [label="0"]; + Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_3 [label="other"]; + Xe63d82c3b46f3acf_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; + Xe63d82c3b46f3acf_3 -> Xe63d82c3b46f3acf_4; + Xe63d82c3b46f3acf_3 [label="_9 <- chkd-Mul(_1, _2)\lAssert _9.1 == false\l"]; + Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_6 [label="0"]; + Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_5 [label="other"]; + Xe63d82c3b46f3acf_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; + Xe63d82c3b46f3acf_5 [label="Return\l"]; + Xe63d82c3b46f3acf_6 [label="Call\l"]; + } + Xe63d82c3b46f3acf_0 -> Xbe62f93610b866bf_0 [label="_1,_2"]; + Xe63d82c3b46f3acf_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_3 [label="Cleanup"]; + X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_1 [label="_0"]; + X86afcabc1ac42f91_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X86afcabc1ac42f91_1 -> X86afcabc1ac42f91_2; + X86afcabc1ac42f91_1 [label="Drop _1\l"]; + X86afcabc1ac42f91_2 [label="Return\l"]; + X86afcabc1ac42f91_3 -> X86afcabc1ac42f91_4; + X86afcabc1ac42f91_3 [label="Drop _1\l"]; + X86afcabc1ac42f91_4 [label="Resume\l"]; + } + X86afcabc1ac42f91_0 -> X69af4523a03742d5_0 [label="_3,_2"]; + subgraph cluster_11 { + label="unchecked_op"; + style="filled"; + color=palegreen; + Xbe62f93610b866bf_0 -> Xbe62f93610b866bf_1 [label="_0"]; + Xbe62f93610b866bf_0 [label="Call\l"]; + Xbe62f93610b866bf_1 [label="Return\l"]; + } + Xbe62f93610b866bf_0 -> Xeba6f5d5a379e29a_0 [label="_1,_2"]; +} diff --git a/scratch/unchecked_mul/unchecked-mul.smir.json b/scratch/unchecked_mul/unchecked-mul.smir.json new file mode 100644 index 000000000..2d32d0103 --- /dev/null +++ b/scratch/unchecked_mul/unchecked-mul.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_mul","crate_id":5290701492876642493,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,42,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,42,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,109,117,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E"}],[32,{"NormalSym":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE"}],[36,{"NoOpSym":""}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[20,{"IntrinsicSym":"black_box"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_mul4main17h0cc64cae78556d0bE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["MulUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hfdc6fe355496207dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null}],"types":[[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_mul/unchecked-op-spec.k b/scratch/unchecked_mul/unchecked-op-spec.k new file mode 100644 index 000000000..44f7e3d11 --- /dev/null +++ b/scratch/unchecked_mul/unchecked-op-spec.k @@ -0,0 +1,74 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 - (1 < i16 { + let unchecked_res = unsafe { a.unchecked_neg() }; + unchecked_res +} diff --git a/scratch/unchecked_neg/unchecked-neg.smir.dot b/scratch/unchecked_neg/unchecked-neg.smir.dot new file mode 100644 index 000000000..f0e5d18e2 --- /dev/null +++ b/scratch/unchecked_neg/unchecked-neg.smir.dot @@ -0,0 +1,137 @@ +digraph { + label="unchecked_neg"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8fc2060ad58510d8_0 [label="Intr: \ncold_path", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="core::num::::unchecked_neg::prec\nondition_check"; + style="filled"; + color=lightgray; + X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_3 [label="0"]; + X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_1 [label="other"]; + X4dfedea7d15dfae0_0 [label="Storage Live _3\l_3 <- Eq(_1, const :: i16)\lSwitchInt _3\l"]; + X4dfedea7d15dfae0_1 -> X4dfedea7d15dfae0_2 [label="_4"]; + X4dfedea7d15dfae0_1 [label="Call\l"]; + X4dfedea7d15dfae0_2 [label="Storage Dead _3\lCall\l"]; + X4dfedea7d15dfae0_3 [label="Storage Dead _3\lReturn\l"]; + } + X4dfedea7d15dfae0_1 -> X8fc2060ad58510d8_0 [label=""]; + X4dfedea7d15dfae0_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_1 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xc472594511031ccd_0 [label="Return\l"]; + } + subgraph cluster_2 { + label="main"; + style="filled"; + color=palegreen; + X83ac00eefa6b73fd_0 -> X83ac00eefa6b73fd_1 [label="_1"]; + X83ac00eefa6b73fd_0 [label="_2 <- Use(const :: i16)\lCall\l"]; + X83ac00eefa6b73fd_1 [label="Return\l"]; + } + X83ac00eefa6b73fd_0 -> X25395281e54f77f2_0 [label="_2"]; + subgraph cluster_3 { + label="std::intrinsics::cold_pat\nh"; + style="filled"; + color=lightgray; + X3664cff3ef814fcc_0 [label="Return\l"]; + } + subgraph cluster_4 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X1e8170c41331abcf_0 -> X1e8170c41331abcf_1 [label="_3"]; + X1e8170c41331abcf_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X1e8170c41331abcf_1 -> X1e8170c41331abcf_2 [label="_2"]; + X1e8170c41331abcf_1 [label="Storage Dead _4\lCall\l"]; + X1e8170c41331abcf_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X1e8170c41331abcf_0 -> Xfd6302c9a18672af_0 [label="_4"]; + X1e8170c41331abcf_1 -> Xd2fa5dcfbfecedff_0 [label="_3"]; + subgraph cluster_5 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + Xfd6302c9a18672af_0 -> Xfd6302c9a18672af_1 [label="_0"]; + Xfd6302c9a18672af_0 [label="Call\l"]; + Xfd6302c9a18672af_1 -> Xfd6302c9a18672af_2 [label="_2"]; + Xfd6302c9a18672af_1 [label="Call\l"]; + Xfd6302c9a18672af_2 [label="Return\l"]; + } + Xfd6302c9a18672af_0 -> Xab2b2ee52cc1a3b6_0 [label="_1,const :: ()"]; + Xfd6302c9a18672af_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_6 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X25395281e54f77f2_0 -> X25395281e54f77f2_1 [label="_0"]; + X25395281e54f77f2_0 [label="Call\l"]; + X25395281e54f77f2_1 [label="Return\l"]; + } + X25395281e54f77f2_0 -> X36f7f4bce11fe0f_0 [label="_1"]; + subgraph cluster_7 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xd2fa5dcfbfecedff_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_8 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_1 [label="_0"]; + Xab2b2ee52cc1a3b6_0 [label="Call\l"]; + Xab2b2ee52cc1a3b6_1 [label="Return\l"]; + } + Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_0: _1 [label=""]; + subgraph cluster_9 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xa028f493aff12071_0 -> Xa028f493aff12071_1 [label="_0"]; + Xa028f493aff12071_0 [label="Call\l"]; + Xa028f493aff12071_1 [label="Return\l"]; + } + Xa028f493aff12071_0 -> X39f0dcc2beb3cbfc_0 [label="_1*,_2"]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_3 [label="Cleanup"]; + X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_1 [label="_0"]; + X39f0dcc2beb3cbfc_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X39f0dcc2beb3cbfc_1 -> X39f0dcc2beb3cbfc_2; + X39f0dcc2beb3cbfc_1 [label="Drop _1\l"]; + X39f0dcc2beb3cbfc_2 [label="Return\l"]; + X39f0dcc2beb3cbfc_3 -> X39f0dcc2beb3cbfc_4; + X39f0dcc2beb3cbfc_3 [label="Drop _1\l"]; + X39f0dcc2beb3cbfc_4 [label="Resume\l"]; + } + X39f0dcc2beb3cbfc_0 -> X1e8170c41331abcf_0 [label="_3,_2"]; + subgraph cluster_11 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X1752551397e242d3_0 -> X1752551397e242d3_1 [label="_5"]; + X1752551397e242d3_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X1752551397e242d3_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X1752551397e242d3_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_12 { + label="core::num::::unchecked_neg"; + style="filled"; + color=lightgray; + X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_2 [label="0"]; + X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_1 [label="other"]; + X36f7f4bce11fe0f_0 [label="Storage Live _2\l_2 <- UbChecks :: bool\lSwitchInt _2\l"]; + X36f7f4bce11fe0f_1 -> X36f7f4bce11fe0f_2 [label="_3"]; + X36f7f4bce11fe0f_1 [label="Call\l"]; + X36f7f4bce11fe0f_2 [label="Storage Dead _2\l_0 <- SubUnchecked(const :: i16, _1)\lReturn\l"]; + } + X36f7f4bce11fe0f_1 -> X4dfedea7d15dfae0_0 [label="_1"]; +} diff --git a/scratch/unchecked_neg/unchecked-neg.smir.json b/scratch/unchecked_neg/unchecked-neg.smir.json new file mode 100644 index 000000000..ec557301f --- /dev/null +++ b/scratch/unchecked_neg/unchecked-neg.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_neg","crate_id":8515610171801290459,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,110,101,103,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E"}],[32,{"NormalSym":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE"}],[24,{"IntrinsicSym":"cold_path"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":46},{"kind":{"Assign":[{"local":2,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":47}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":46}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":48,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":49}},{"statements":[{"kind":{"StorageDead":2},"span":51},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":7}}},{"Copy":{"local":1,"projection":[]}}]}]},"span":53}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":23,"span":54,"mutability":"Mut"},{"ty":23,"span":55,"mutability":"Not"},{"ty":21,"span":46,"mutability":"Mut"},{"ty":1,"span":49,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":55,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":56}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":14}}}}]},"span":75}],"terminator":{"kind":"Return","span":74}}],"locals":[{"ty":17,"span":76,"mutability":"Mut"},{"ty":1,"span":77,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":77,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":78}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg4main17h279e62d4b439df5fE","mono_item_kind":{"MonoItemFn":{"name":"main","id":9,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}}]},"span":82}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":15}}},"args":[{"Move":{"local":2,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":80}},{"statements":[],"terminator":{"kind":"Return","span":83}}],"locals":[{"ty":1,"span":84,"mutability":"Mut"},{"ty":23,"span":85,"mutability":"Not"},{"ty":23,"span":82,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":86,"scope":1},"composite":null,"value":{"Const":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}},"argument_index":null},{"name":"result","source_info":{"span":85,"scope":2},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":87}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":72}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":13}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":72}},{"statements":[],"terminator":{"kind":"Resume","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":12,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"},{"ty":31,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg::precondition_check","id":5,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":58},{"kind":{"Assign":[{"local":3,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":8}}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,3]],"otherwise":1}}},"span":57}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":9}}},"args":[],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":61}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":62,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":10}}},"args":[{"Constant":{"span":63,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}],"destination":{"local":2,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":64}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":1,"span":67,"mutability":"Mut"},{"ty":23,"span":68,"mutability":"Not"},{"ty":27,"span":64,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Mut"},{"ty":1,"span":61,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"lhs","source_info":{"span":68,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":69,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":70,"scope":2},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":71}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":12}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":29,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":1,"span":72,"mutability":"Mut"},{"ty":7,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":10,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":88,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":89}},{"statements":[],"terminator":{"kind":"Return","span":90}}],"locals":[{"ty":23,"span":91,"mutability":"Mut"},{"ty":23,"span":92,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"a","source_info":{"span":92,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"unchecked_res","source_info":{"span":93,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":94}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE","mono_item_kind":{"MonoItemFn":{"name":"std::intrinsics::cold_path","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":45}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":7,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":73}}],"locals":[{"ty":1,"span":73,"mutability":"Mut"},{"ty":29,"span":73,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":73}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[21,{"RigidTy":"Bool"}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_neg/unchecked-op-spec.k b/scratch/unchecked_neg/unchecked-op-spec.k new file mode 100644 index 000000000..997143004 --- /dev/null +++ b/scratch/unchecked_neg/unchecked-op-spec.k @@ -0,0 +1,72 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 79 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 15 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) .Bodies ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 - (1 < + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 71 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 13 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 - (1 < i16 { + let unchecked_res = unsafe { a.unchecked_shl(b) }; + unchecked_res +} diff --git a/scratch/unchecked_shl/unchecked-shl.smir.dot b/scratch/unchecked_shl/unchecked-shl.smir.dot new file mode 100644 index 000000000..b621a4e00 --- /dev/null +++ b/scratch/unchecked_shl/unchecked-shl.smir.dot @@ -0,0 +1,127 @@ +digraph { + label="unchecked_shl"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + subgraph cluster_0 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X7ca0ff879d4d13eb_0 -> X7ca0ff879d4d13eb_1 [label="_0"]; + X7ca0ff879d4d13eb_0 [label="Call\l"]; + X7ca0ff879d4d13eb_1 [label="Return\l"]; + } + X7ca0ff879d4d13eb_0 -> Xf64250b1070257e5_0 [label="_1*,_2"]; + subgraph cluster_1 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_1 [label="_0"]; + Xca73baf8b721e82c_0 [label="Call\l"]; + Xca73baf8b721e82c_1 [label="Return\l"]; + } + Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_0: _1 [label=""]; + subgraph cluster_2 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X6985b604fd3ae6be_0 -> X6985b604fd3ae6be_1 [label="_0"]; + X6985b604fd3ae6be_0 [label="Call\l"]; + X6985b604fd3ae6be_1 [label="Return\l"]; + } + X6985b604fd3ae6be_0 -> Xe1c01b35d6c2026f_0 [label="_1,_2"]; + subgraph cluster_3 { + label="core::num::::unchecked_shl"; + style="filled"; + color=lightgray; + Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_2 [label="0"]; + Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_1 [label="other"]; + Xe1c01b35d6c2026f_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xe1c01b35d6c2026f_1 -> Xe1c01b35d6c2026f_2 [label="_4"]; + Xe1c01b35d6c2026f_1 [label="Call\l"]; + Xe1c01b35d6c2026f_2 [label="Storage Dead _3\l_0 <- ShlUnchecked(_1, _2)\lReturn\l"]; + } + Xe1c01b35d6c2026f_1 -> X739610367822bd9b_0 [label="_2"]; + subgraph cluster_4 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xf64250b1070257e5_0 -> Xf64250b1070257e5_3 [label="Cleanup"]; + Xf64250b1070257e5_0 -> Xf64250b1070257e5_1 [label="_0"]; + Xf64250b1070257e5_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xf64250b1070257e5_1 -> Xf64250b1070257e5_2; + Xf64250b1070257e5_1 [label="Drop _1\l"]; + Xf64250b1070257e5_2 [label="Return\l"]; + Xf64250b1070257e5_3 -> Xf64250b1070257e5_4; + Xf64250b1070257e5_3 [label="Drop _1\l"]; + Xf64250b1070257e5_4 [label="Resume\l"]; + } + Xf64250b1070257e5_0 -> X8c1d75f364744448_0 [label="_3,_2"]; + subgraph cluster_5 { + label="core::num::::unchecked_shl::prec\nondition_check"; + style="filled"; + color=lightgray; + X739610367822bd9b_0 -> X739610367822bd9b_2 [label="0"]; + X739610367822bd9b_0 -> X739610367822bd9b_1 [label="other"]; + X739610367822bd9b_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; + X739610367822bd9b_1 [label="Storage Dead _2\lReturn\l"]; + X739610367822bd9b_2 [label="Call\l"]; + } + X739610367822bd9b_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X8c1d75f364744448_0 -> X8c1d75f364744448_1 [label="_3"]; + X8c1d75f364744448_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X8c1d75f364744448_1 -> X8c1d75f364744448_2 [label="_2"]; + X8c1d75f364744448_1 [label="Storage Dead _4\lCall\l"]; + X8c1d75f364744448_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X8c1d75f364744448_0 -> X92deb757c4463693_0 [label="_4"]; + X8c1d75f364744448_1 -> X9e057dae70d0b216_0 [label="_3"]; + subgraph cluster_7 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xebd6923e157bf244_0 [label="Return\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + Xd9564944a8357ebc_0 -> Xd9564944a8357ebc_1 [label="_5"]; + Xd9564944a8357ebc_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + Xd9564944a8357ebc_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + Xd9564944a8357ebc_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_9 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X92deb757c4463693_0 -> X92deb757c4463693_1 [label="_0"]; + X92deb757c4463693_0 [label="Call\l"]; + X92deb757c4463693_1 -> X92deb757c4463693_2 [label="_2"]; + X92deb757c4463693_1 [label="Call\l"]; + X92deb757c4463693_2 [label="Return\l"]; + } + X92deb757c4463693_0 -> Xca73baf8b721e82c_0 [label="_1,const :: ()"]; + X92deb757c4463693_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_10 { + label="main"; + style="filled"; + color=palegreen; + Xb244b26227a3c207_0 -> Xb244b26227a3c207_1 [label="_1"]; + Xb244b26227a3c207_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; + Xb244b26227a3c207_1 [label="Return\l"]; + } + Xb244b26227a3c207_0 -> X6985b604fd3ae6be_0 [label="_2,_3"]; + subgraph cluster_11 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X9e057dae70d0b216_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } +} diff --git a/scratch/unchecked_shl/unchecked-shl.smir.json b/scratch/unchecked_shl/unchecked-shl.smir.json new file mode 100644 index 000000000..8dae9a816 --- /dev/null +++ b/scratch/unchecked_shl/unchecked-shl.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_shl","crate_id":2438242285894030786,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E"}],[32,{"NormalSym":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h4b70c8118c54af25E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl4main17h99915c6a84d89e82E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShlUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_shr/unchecked-op-spec.k b/scratch/unchecked_shr/unchecked-op-spec.k new file mode 100644 index 000000000..f5b8f4761 --- /dev/null +++ b/scratch/unchecked_shr/unchecked-op-spec.k @@ -0,0 +1,74 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 71 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 13 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 - (1 < i16 { + let unchecked_res = unsafe { a.unchecked_shr(b) }; + unchecked_res +} diff --git a/scratch/unchecked_shr/unchecked-shr.smir.dot b/scratch/unchecked_shr/unchecked-shr.smir.dot new file mode 100644 index 000000000..4bfe94015 --- /dev/null +++ b/scratch/unchecked_shr/unchecked-shr.smir.dot @@ -0,0 +1,127 @@ +digraph { + label="unchecked_shr"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + subgraph cluster_0 { + label="core::num::::unchecked_shr"; + style="filled"; + color=lightgray; + X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_2 [label="0"]; + X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_1 [label="other"]; + X3dfb10421593b1e8_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + X3dfb10421593b1e8_1 -> X3dfb10421593b1e8_2 [label="_4"]; + X3dfb10421593b1e8_1 [label="Call\l"]; + X3dfb10421593b1e8_2 [label="Storage Dead _3\l_0 <- ShrUnchecked(_1, _2)\lReturn\l"]; + } + X3dfb10421593b1e8_1 -> X67406d0b881e84da_0 [label="_2"]; + subgraph cluster_1 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X1fcbbfbc6742d998_0 -> X1fcbbfbc6742d998_1 [label="_5"]; + X1fcbbfbc6742d998_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X1fcbbfbc6742d998_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X1fcbbfbc6742d998_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_2 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X2ea79ec23c0f6969_0 -> X2ea79ec23c0f6969_1 [label="_0"]; + X2ea79ec23c0f6969_0 [label="Call\l"]; + X2ea79ec23c0f6969_1 [label="Return\l"]; + } + X2ea79ec23c0f6969_0 -> X3dfb10421593b1e8_0 [label="_1,_2"]; + subgraph cluster_3 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X308478c52589b452_0 -> X308478c52589b452_1 [label="_0"]; + X308478c52589b452_0 [label="Call\l"]; + X308478c52589b452_1 [label="Return\l"]; + } + X308478c52589b452_0 -> X308478c52589b452_0: _1 [label=""]; + subgraph cluster_4 { + label="main"; + style="filled"; + color=palegreen; + X74e505ee082dcd3c_0 -> X74e505ee082dcd3c_1 [label="_1"]; + X74e505ee082dcd3c_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; + X74e505ee082dcd3c_1 [label="Return\l"]; + } + X74e505ee082dcd3c_0 -> X2ea79ec23c0f6969_0 [label="_2,_3"]; + subgraph cluster_5 { + label="core::num::::unchecked_shr::prec\nondition_check"; + style="filled"; + color=lightgray; + X67406d0b881e84da_0 -> X67406d0b881e84da_2 [label="0"]; + X67406d0b881e84da_0 -> X67406d0b881e84da_1 [label="other"]; + X67406d0b881e84da_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; + X67406d0b881e84da_1 [label="Storage Dead _2\lReturn\l"]; + X67406d0b881e84da_2 [label="Call\l"]; + } + X67406d0b881e84da_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X63a912d85dcf5dbc_0 -> X63a912d85dcf5dbc_1 [label="_0"]; + X63a912d85dcf5dbc_0 [label="Call\l"]; + X63a912d85dcf5dbc_1 [label="Return\l"]; + } + X63a912d85dcf5dbc_0 -> Xc86fbb6bb8f835bf_0 [label="_1*,_2"]; + subgraph cluster_7 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X8f6613fb2e5e284f_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + Xc5c68a464c01d1d6_0 -> Xc5c68a464c01d1d6_1 [label="_3"]; + Xc5c68a464c01d1d6_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + Xc5c68a464c01d1d6_1 -> Xc5c68a464c01d1d6_2 [label="_2"]; + Xc5c68a464c01d1d6_1 [label="Storage Dead _4\lCall\l"]; + Xc5c68a464c01d1d6_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xc5c68a464c01d1d6_0 -> X418d756885456e9e_0 [label="_4"]; + Xc5c68a464c01d1d6_1 -> X8f6613fb2e5e284f_0 [label="_3"]; + subgraph cluster_9 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xa8d344f9e18404f4_0 [label="Return\l"]; + } + subgraph cluster_10 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X418d756885456e9e_0 -> X418d756885456e9e_1 [label="_0"]; + X418d756885456e9e_0 [label="Call\l"]; + X418d756885456e9e_1 -> X418d756885456e9e_2 [label="_2"]; + X418d756885456e9e_1 [label="Call\l"]; + X418d756885456e9e_2 [label="Return\l"]; + } + X418d756885456e9e_0 -> X308478c52589b452_0 [label="_1,const :: ()"]; + X418d756885456e9e_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_11 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_3 [label="Cleanup"]; + Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_1 [label="_0"]; + Xc86fbb6bb8f835bf_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xc86fbb6bb8f835bf_1 -> Xc86fbb6bb8f835bf_2; + Xc86fbb6bb8f835bf_1 [label="Drop _1\l"]; + Xc86fbb6bb8f835bf_2 [label="Return\l"]; + Xc86fbb6bb8f835bf_3 -> Xc86fbb6bb8f835bf_4; + Xc86fbb6bb8f835bf_3 [label="Drop _1\l"]; + Xc86fbb6bb8f835bf_4 [label="Resume\l"]; + } + Xc86fbb6bb8f835bf_0 -> Xc5c68a464c01d1d6_0 [label="_3,_2"]; +} diff --git a/scratch/unchecked_shr/unchecked-shr.smir.json b/scratch/unchecked_shr/unchecked-shr.smir.json new file mode 100644 index 000000000..dba54586c --- /dev/null +++ b/scratch/unchecked_shr/unchecked-shr.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_shr","crate_id":11374706484823853070,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,114,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E"}],[20,{"IntrinsicSym":"black_box"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E"}],[32,{"NormalSym":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hd2b815e8bd96d253E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShrUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_sub/unchecked-op-spec.k b/scratch/unchecked_sub/unchecked-op-spec.k new file mode 100644 index 000000000..0d003e6ca --- /dev/null +++ b/scratch/unchecked_sub/unchecked-op-spec.k @@ -0,0 +1,74 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 - (1 < i16::MAX) && (a - b < i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_sub(b) }; + unchecked_res +} diff --git a/scratch/unchecked_sub/unchecked-sub.smir.dot b/scratch/unchecked_sub/unchecked-sub.smir.dot new file mode 100644 index 000000000..7dd70579e --- /dev/null +++ b/scratch/unchecked_sub/unchecked-sub.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_sub"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X6ed7f5222f8fff3d_0 -> X6ed7f5222f8fff3d_1 [label="_0"]; + X6ed7f5222f8fff3d_0 [label="Call\l"]; + X6ed7f5222f8fff3d_1 -> X6ed7f5222f8fff3d_2 [label="_2"]; + X6ed7f5222f8fff3d_1 [label="Call\l"]; + X6ed7f5222f8fff3d_2 [label="Return\l"]; + } + X6ed7f5222f8fff3d_0 -> X2c1ab9ccb2ee2902_0 [label="_1,const :: ()"]; + X6ed7f5222f8fff3d_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xb356150a39730498_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="core::num::::unchecked_sub"; + style="filled"; + color=lightgray; + Xe89ce436dda28930_0 -> Xe89ce436dda28930_2 [label="0"]; + Xe89ce436dda28930_0 -> Xe89ce436dda28930_1 [label="other"]; + Xe89ce436dda28930_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xe89ce436dda28930_1 -> Xe89ce436dda28930_2 [label="_4"]; + Xe89ce436dda28930_1 [label="Call\l"]; + Xe89ce436dda28930_2 [label="Storage Dead _3\l_0 <- SubUnchecked(_1, _2)\lReturn\l"]; + } + Xe89ce436dda28930_1 -> Xd6d8542b139753eb_0 [label="_1,_2"]; + subgraph cluster_3 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X4d9411a803faadfe_0 -> X4d9411a803faadfe_3 [label="Cleanup"]; + X4d9411a803faadfe_0 -> X4d9411a803faadfe_1 [label="_0"]; + X4d9411a803faadfe_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X4d9411a803faadfe_1 -> X4d9411a803faadfe_2; + X4d9411a803faadfe_1 [label="Drop _1\l"]; + X4d9411a803faadfe_2 [label="Return\l"]; + X4d9411a803faadfe_3 -> X4d9411a803faadfe_4; + X4d9411a803faadfe_3 [label="Drop _1\l"]; + X4d9411a803faadfe_4 [label="Resume\l"]; + } + X4d9411a803faadfe_0 -> X396121085053712_0 [label="_3,_2"]; + subgraph cluster_4 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_1 [label="_0"]; + X2c1ab9ccb2ee2902_0 [label="Call\l"]; + X2c1ab9ccb2ee2902_1 [label="Return\l"]; + } + X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_0: _1 [label=""]; + subgraph cluster_5 { + label="main"; + style="filled"; + color=palegreen; + X4f441ab82149a815_0 -> X4f441ab82149a815_1 [label="_3"]; + X4f441ab82149a815_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + X4f441ab82149a815_1 -> X4f441ab82149a815_2; + X4f441ab82149a815_1 [label="_6 <- chkd-Sub(_1, _2)\lAssert _6.1 == false\l"]; + X4f441ab82149a815_2 -> X4f441ab82149a815_6 [label="0"]; + X4f441ab82149a815_2 -> X4f441ab82149a815_3 [label="other"]; + X4f441ab82149a815_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; + X4f441ab82149a815_3 -> X4f441ab82149a815_4; + X4f441ab82149a815_3 [label="_9 <- chkd-Sub(_1, _2)\lAssert _9.1 == false\l"]; + X4f441ab82149a815_4 -> X4f441ab82149a815_6 [label="0"]; + X4f441ab82149a815_4 -> X4f441ab82149a815_5 [label="other"]; + X4f441ab82149a815_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; + X4f441ab82149a815_5 [label="Return\l"]; + X4f441ab82149a815_6 [label="Call\l"]; + } + X4f441ab82149a815_0 -> X949dd9980f2a3388_0 [label="_1,_2"]; + X4f441ab82149a815_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_6 { + label="core::num::::unchecked_sub::prec\nondition_check"; + style="filled"; + color=lightgray; + Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_2 [label="0"]; + Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_1 [label="other"]; + Xd6d8542b139753eb_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Sub(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + Xd6d8542b139753eb_1 [label="Call\l"]; + Xd6d8542b139753eb_2 [label="Return\l"]; + } + Xd6d8542b139753eb_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_7 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X396121085053712_0 -> X396121085053712_1 [label="_3"]; + X396121085053712_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X396121085053712_1 -> X396121085053712_2 [label="_2"]; + X396121085053712_1 [label="Storage Dead _4\lCall\l"]; + X396121085053712_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X396121085053712_0 -> X6ed7f5222f8fff3d_0 [label="_4"]; + X396121085053712_1 -> Xb356150a39730498_0 [label="_3"]; + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X3d6480ec228be4ec_0 -> X3d6480ec228be4ec_1 [label="_5"]; + X3d6480ec228be4ec_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X3d6480ec228be4ec_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X3d6480ec228be4ec_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_9 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X949dd9980f2a3388_0 -> X949dd9980f2a3388_1 [label="_0"]; + X949dd9980f2a3388_0 [label="Call\l"]; + X949dd9980f2a3388_1 [label="Return\l"]; + } + X949dd9980f2a3388_0 -> Xe89ce436dda28930_0 [label="_1,_2"]; + subgraph cluster_10 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X7cb88635fb24da5a_0 [label="Return\l"]; + } + subgraph cluster_11 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X41331acabe05b18d_0 -> X41331acabe05b18d_1 [label="_0"]; + X41331acabe05b18d_0 [label="Call\l"]; + X41331acabe05b18d_1 [label="Return\l"]; + } + X41331acabe05b18d_0 -> X4d9411a803faadfe_0 [label="_1*,_2"]; +} diff --git a/scratch/unchecked_sub/unchecked-sub.smir.json b/scratch/unchecked_sub/unchecked-sub.smir.json new file mode 100644 index 000000000..ae8aeea5f --- /dev/null +++ b/scratch/unchecked_sub/unchecked-sub.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_sub","crate_id":17961444647620661476,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,45,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,45,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,117,98,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[20,{"IntrinsicSym":"black_box"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E"}],[32,{"NormalSym":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub4main17h289393681834f0fcE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h233dfbd9029fc4f7E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null}],"types":[[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[9,{"RigidTy":{"Uint":"U8"}}]],"debug":null} \ No newline at end of file From 0ef0094001ecec4676d26439e7815d2c3bdcf632 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 18:09:59 -0300 Subject: [PATCH 06/84] Fixing requires clause for unchecked operations --- scratch/unchecked_add/unchecked-op-spec.k | 12 +++++++----- scratch/unchecked_mul/unchecked-op-spec.k | 4 ++-- scratch/unchecked_neg/unchecked-op-spec.k | 4 ++-- scratch/unchecked_shl/unchecked-op-spec.k | 4 ++-- scratch/unchecked_shr/unchecked-op-spec.k | 4 ++-- scratch/unchecked_sub/unchecked-op-spec.k | 4 ++-- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/scratch/unchecked_add/unchecked-op-spec.k b/scratch/unchecked_add/unchecked-op-spec.k index afe7e0fb4..278f9ef7c 100644 --- a/scratch/unchecked_add/unchecked-op-spec.k +++ b/scratch/unchecked_add/unchecked-op-spec.k @@ -56,15 +56,17 @@ module UNCHECKED-OP-SPEC _ => ?_ - (ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) ) + requires // i16 invariants - 0 - (1 < requires // i16 invariants - 0 - (1 < requires // i16 invariants - 0 - (1 < requires // i16 invariants - 0 - (1 < requires // i16 invariants - 0 - (1 < requires // i16 invariants - 0 - (1 < Date: Fri, 21 Mar 2025 18:38:30 -0300 Subject: [PATCH 07/84] Adding rust-verification-proofs folder --- rust-verification-proofs/README.md | 1 + .../maximum-proof/README.md | 96 ++++++++++++ .../maximum-proof/main-max-with-lt.rs | 18 +++ .../maximum-proof/main-max-with-lt.smir.dot | 135 +++++++++++++++++ .../maximum-proof/main-max-with-lt.smir.json | 1 + .../maximum-proof/maximum-spec.k | 74 +++++++++ .../unchecked_add/unchecked-add.rs | 14 ++ .../unchecked_add/unchecked-add.smir.dot | 140 ++++++++++++++++++ .../unchecked_add/unchecked-add.smir.json | 1 + .../unchecked_add/unchecked-op-spec.k | 76 ++++++++++ .../unchecked_mul/unchecked-mul.rs | 14 ++ .../unchecked_mul/unchecked-mul.smir.dot | 140 ++++++++++++++++++ .../unchecked_mul/unchecked-mul.smir.json | 1 + .../unchecked_mul/unchecked-op-spec.k | 74 +++++++++ .../unchecked_neg/unchecked-neg.rs | 12 ++ .../unchecked_neg/unchecked-neg.smir.dot | 137 +++++++++++++++++ .../unchecked_neg/unchecked-neg.smir.json | 1 + .../unchecked_neg/unchecked-op-spec.k | 72 +++++++++ .../unchecked_shl/unchecked-op-spec.k | 74 +++++++++ .../unchecked_shl/unchecked-shl.rs | 13 ++ .../unchecked_shl/unchecked-shl.smir.dot | 127 ++++++++++++++++ .../unchecked_shl/unchecked-shl.smir.json | 1 + .../unchecked_shr/unchecked-op-spec.k | 74 +++++++++ .../unchecked_shr/unchecked-shr.rs | 13 ++ .../unchecked_shr/unchecked-shr.smir.dot | 127 ++++++++++++++++ .../unchecked_shr/unchecked-shr.smir.json | 1 + .../unchecked_sub/unchecked-op-spec.k | 74 +++++++++ .../unchecked_sub/unchecked-sub.rs | 14 ++ .../unchecked_sub/unchecked-sub.smir.dot | 140 ++++++++++++++++++ .../unchecked_sub/unchecked-sub.smir.json | 1 + 30 files changed, 1666 insertions(+) create mode 100644 rust-verification-proofs/README.md create mode 100644 rust-verification-proofs/maximum-proof/README.md create mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.rs create mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot create mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json create mode 100644 rust-verification-proofs/maximum-proof/maximum-spec.k create mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.rs create mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.dot create mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.json create mode 100644 rust-verification-proofs/unchecked_add/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.rs create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.rs create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.rs create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.rs create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.rs create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md new file mode 100644 index 000000000..4123ec020 --- /dev/null +++ b/rust-verification-proofs/README.md @@ -0,0 +1 @@ +Init text \ No newline at end of file diff --git a/rust-verification-proofs/maximum-proof/README.md b/rust-verification-proofs/maximum-proof/README.md new file mode 100644 index 000000000..ea565f7bf --- /dev/null +++ b/rust-verification-proofs/maximum-proof/README.md @@ -0,0 +1,96 @@ +# Turning the max-with-lt program into a property proof + +## Example program that we start from + +```rust +fn main() { + + let a:usize = 42; + let b:usize = -43; + let c:usize = 0; + + let result = maximum(a, b, c); + + assert!(result >= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: usize, b: usize, c: usize) -> usize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} +``` + +We want to prove a property of `maximum`: +- When called with `a`, `b`, and `c`, +- the `result` will be greater or equal all of the arguments, +- and equal to one (or more) of them. + +The `main` program above states this using some concrete values of `a`, `b`, and `c`. We will run this program to construct a general symbolic claim and prove it. + +In a future version, we will be able to start directly with the `maximum` function call and provide symbolic arguments to it. This will save some manual work setting up the claim file and fits the target of proving based on property tests. + +## Extracting Stable MIR for the program + +Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. + +```shell +maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +``` +The Stable MIR for the program can also be rendered as a graph, using the `--dot` option. This creates `main-max-with-lt.smir.dot`. + +```shell +maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +``` +## Constructing the claim by executing `main` to certain points + +1. The program (`main`) reaches the call to `maximum` after 22 steps. + The following command runs it and displays the resulting program state. + + ```shell + maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S + ``` + - Arguments `a`, `b`, and `c` are initialised to `Integer`s as `locals[1]` to `locals[3]` + - A `call` terminator calling function `ty(25)` is executed next (front of the `k` cell) + - The function table contains `ty(25) -> "maximum" code. + - Other state (how `main` continues, its other local variables, and some internal functions) is relevant to the proof we want to perform. +2. The program executes for a total of 92 steps to reach the point where it `return`s from `maximum`. + The following command runs it and displays the resulting program state. + + ```shell + maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S + ``` + - The value `locals[0]` is now set to an `Integer`. This will be the target of our assertions. + - A `return` terminator is executed next (front of the `k` cell), it will return `locals[0]` + - It should be an `Integer` with the desired properties as stated above + +State 1. defines our start state for the claim. Irrelevant parts are elided (replaced by variables). +* The code of the `maximum` function in the `functions` table needs to be kept. We also keep its identifier `ty(25)`. Other functions can be removed (we won't perform a return). +* The `call` terminator is kept, calling `ty(25)` with arguments from `locals[1,2,3]`. `target` is modified to be `noBasicBlockIdx` to force termination of the prover (no block to jump back to). +* The four locals `0` - `3` are required in their original order to provide the function arguments. The values of `a`, `b`, and `c` in locals `1` - `3` are replaced with symbolic variables used in the proof. +* We could keep all other locals but do not have to (however it is important that the list of locals has a known length). +* `main`s other details in `currentFrame` are irrelevant and elided. + + +State 2. is the end state, where all that matters is the returned value. + +* The `locals` list should contain this `?RESULT` value at index `0` +* The `?RESULT` value should have the properties stated (equivalent to the assertion in `main`) +* Because of the modified `target`, the program should end, i.e., have an `#EndProgram` in the `k` cell. + +The above is written as a _claim_ in K framework language into a `maximum-spec.k` file. +Most of the syntax can be copied from the output of the `kmir run` commands above, and irrelevant parts replaced by `_` (LHS) or `?_` (RHS). + +Alternatively, it is possible to construct a claim that the entire rest of the program after initialising the variables will result in the desired `?RESULT`, i.e., the assertion in `main` is executed successfully and the program ends in `#EndProgram` after checking it. This would require more steps. + +## Running the prover on the claim and viewing the proof +```shell +maximum-proof$ poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof +``` + +The proof steps are saved in the `$PWD/proof` directory for later inspection using `kmir prove view`. This is especially important when the proof does _not_ succeed immediately. + +```shell +maximum-proof$ poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof +``` diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs new file mode 100644 index 000000000..25d54c526 --- /dev/null +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs @@ -0,0 +1,18 @@ + +fn main() { + + let a:isize = 42; + let b:isize = -43; + let c:isize = 0; + + let result = maximum(a, b, c); + + assert!(result >= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: isize, b: isize, c: isize) -> isize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot new file mode 100644 index 000000000..d6a136c47 --- /dev/null +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot @@ -0,0 +1,135 @@ +digraph { + label="main_max_with_lt"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + subgraph cluster_0 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + Xb022926f55be7915_0 -> Xb022926f55be7915_1 [label="_3"]; + Xb022926f55be7915_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + Xb022926f55be7915_1 -> Xb022926f55be7915_2 [label="_2"]; + Xb022926f55be7915_1 [label="Storage Dead _4\lCall\l"]; + Xb022926f55be7915_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xb022926f55be7915_0 -> X86cc23a99438eb2_0 [label="_4"]; + Xb022926f55be7915_1 -> X20f17eb946604891_0 [label="_3"]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X20f17eb946604891_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_3 [label="Cleanup"]; + Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_1 [label="_0"]; + Xda86ab50b6674bf3_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xda86ab50b6674bf3_1 -> Xda86ab50b6674bf3_2; + Xda86ab50b6674bf3_1 [label="Drop _1\l"]; + Xda86ab50b6674bf3_2 [label="Return\l"]; + Xda86ab50b6674bf3_3 -> Xda86ab50b6674bf3_4; + Xda86ab50b6674bf3_3 [label="Drop _1\l"]; + Xda86ab50b6674bf3_4 [label="Resume\l"]; + } + Xda86ab50b6674bf3_0 -> Xb022926f55be7915_0 [label="_3,_2"]; + subgraph cluster_3 { + label="main"; + style="filled"; + color=palegreen; + X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="_4"]; + X37252ea5c5b3ce2a_0 [label="_1 <- Use(const :: isize)\l_2 <- Use(const :: isize)\l_3 <- Use(const :: isize)\lCall\l"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; + X37252ea5c5b3ce2a_1 [label="_5 <- Ge(_4, _1)\lSwitchInt _5\l"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; + X37252ea5c5b3ce2a_2 [label="_6 <- Ge(_4, _2)\lSwitchInt _6\l"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; + X37252ea5c5b3ce2a_3 [label="_7 <- Ge(_4, _3)\lSwitchInt _7\l"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_4 [label="_8 <- Eq(_4, _1)\lSwitchInt _8\l"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_5 [label="_9 <- Eq(_4, _2)\lSwitchInt _9\l"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_6 [label="_10 <- Eq(_4, _3)\lSwitchInt _10\l"]; + X37252ea5c5b3ce2a_7 [label="Call\l"]; + X37252ea5c5b3ce2a_8 [label="Return\l"]; + } + X37252ea5c5b3ce2a_0 -> X527779074a5fd21e_0 [label="_1,_2,_3"]; + X37252ea5c5b3ce2a_7 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_4 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X86cc23a99438eb2_0 -> X86cc23a99438eb2_1 [label="_0"]; + X86cc23a99438eb2_0 [label="Call\l"]; + X86cc23a99438eb2_1 -> X86cc23a99438eb2_2 [label="_2"]; + X86cc23a99438eb2_1 [label="Call\l"]; + X86cc23a99438eb2_2 [label="Return\l"]; + } + X86cc23a99438eb2_0 -> X2a67ec2487cf8e32_0 [label="_1,const :: ()"]; + X86cc23a99438eb2_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_5 { + label="maximum"; + style="filled"; + color=palegreen; + X527779074a5fd21e_0 -> X527779074a5fd21e_2 [label="0"]; + X527779074a5fd21e_0 -> X527779074a5fd21e_1 [label="other"]; + X527779074a5fd21e_0 [label="_5 <- Lt(_1, _2)\lSwitchInt _5\l"]; + X527779074a5fd21e_1 -> X527779074a5fd21e_3; + X527779074a5fd21e_1 [label="_4 <- Use(_2)\lGoto\l"]; + X527779074a5fd21e_2 -> X527779074a5fd21e_3; + X527779074a5fd21e_2 [label="_4 <- Use(_1)\lGoto\l"]; + X527779074a5fd21e_3 -> X527779074a5fd21e_5 [label="0"]; + X527779074a5fd21e_3 -> X527779074a5fd21e_4 [label="other"]; + X527779074a5fd21e_3 [label="_7 <- Use(_4)\l_6 <- Lt(_7, _3)\lSwitchInt _6\l"]; + X527779074a5fd21e_4 -> X527779074a5fd21e_6; + X527779074a5fd21e_4 [label="_0 <- Use(_3)\lGoto\l"]; + X527779074a5fd21e_5 -> X527779074a5fd21e_6; + X527779074a5fd21e_5 [label="_0 <- Use(_4)\lGoto\l"]; + X527779074a5fd21e_6 [label="Return\l"]; + } + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X34679ac96970715e_0 -> X34679ac96970715e_1 [label="_0"]; + X34679ac96970715e_0 [label="Call\l"]; + X34679ac96970715e_1 [label="Return\l"]; + } + X34679ac96970715e_0 -> Xda86ab50b6674bf3_0 [label="_1*,_2"]; + subgraph cluster_7 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xb149796b83f1b2e4_0 [label="Return\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + Xc8323e8e5ef1862e_0 -> Xc8323e8e5ef1862e_1 [label="_5"]; + Xc8323e8e5ef1862e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + Xc8323e8e5ef1862e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + Xc8323e8e5ef1862e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_9 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_1 [label="_0"]; + X2a67ec2487cf8e32_0 [label="Call\l"]; + X2a67ec2487cf8e32_1 [label="Return\l"]; + } + X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_0: _1 [label=""]; +} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json new file mode 100644 index 000000000..847684ef6 --- /dev/null +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json @@ -0,0 +1 @@ +{"name":"main_max_with_lt","crate_id":5373935543796547206,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116,32,62,61,32,97,32,38,38,32,114,101,115,117,108,116,32,62,61,32,98,32,38,38,32,114,101,115,117,108,116,32,62,61,32,99,32,38,38,10,32,32,32,32,40,114,101,115,117,108,116,32,61,61,32,97,32,124,124,32,114,101,115,117,108,116,32,61,61,32,98,32,124,124,32,114,101,115,117,108,116,32,61,61,32,99,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[30,{"NoOpSym":""}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE"}],[25,{"NormalSym":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE","mono_item_kind":{"MonoItemFn":{"name":"maximum","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":69}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":69}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[]}}}]},"span":71}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[]}}}]},"span":72}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":74},{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":7,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":73}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":4}}},"span":73}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":3,"projection":[]}}}]},"span":76}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":77}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[],"terminator":{"kind":"Return","span":78}}],"locals":[{"ty":6,"span":79,"mutability":"Mut"},{"ty":6,"span":80,"mutability":"Not"},{"ty":6,"span":81,"mutability":"Not"},{"ty":6,"span":82,"mutability":"Not"},{"ty":6,"span":83,"mutability":"Not"},{"ty":28,"span":69,"mutability":"Mut"},{"ty":28,"span":73,"mutability":"Mut"},{"ty":6,"span":74,"mutability":"Mut"}],"arg_count":3,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":81,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"c","source_info":{"span":82,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"max_ab","source_info":{"span":83,"scope":1},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":84}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN16main_max_with_lt4main17h96bac61ef98236a2E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255,255,255,255,255,255,255],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":11}}}}]},"span":53},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":12}}}}]},"span":54}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}},{"Copy":{"local":3,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":1,"unwind":"Continue"}},"span":51}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":2}}},"span":55}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":3}}},"span":56}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":57}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":4}}},"span":57}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":8,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":8}}},"span":58}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":59}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":9,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":8}}},"span":59}},{"statements":[{"kind":{"Assign":[{"local":10,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":60}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":10,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":8}}},"span":60}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":61,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":13}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":14}}}],"destination":{"local":11,"projection":[]},"target":null,"unwind":"Continue"}},"span":61}},{"statements":[],"terminator":{"kind":"Return","span":62}}],"locals":[{"ty":1,"span":63,"mutability":"Mut"},{"ty":6,"span":64,"mutability":"Not"},{"ty":6,"span":65,"mutability":"Not"},{"ty":6,"span":66,"mutability":"Not"},{"ty":6,"span":67,"mutability":"Not"},{"ty":28,"span":55,"mutability":"Mut"},{"ty":28,"span":56,"mutability":"Mut"},{"ty":28,"span":57,"mutability":"Mut"},{"ty":28,"span":58,"mutability":"Mut"},{"ty":28,"span":59,"mutability":"Mut"},{"ty":28,"span":60,"mutability":"Mut"},{"ty":29,"span":61,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":64,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":65,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":66,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":67,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17he1705726abca17eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h563c9dfa7d67f6e6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5364b7b343208af1E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[28,{"RigidTy":"Bool"}]],"debug":null} \ No newline at end of file diff --git a/rust-verification-proofs/maximum-proof/maximum-spec.k b/rust-verification-proofs/maximum-proof/maximum-spec.k new file mode 100644 index 000000000..4474fac6e --- /dev/null +++ b/rust-verification-proofs/maximum-proof/maximum-spec.k @@ -0,0 +1,74 @@ +module MAXIMUM-SPEC + imports KMIR + + claim [maximum-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 50 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 25 ) , // <- this is the reference to `maximum` + id: mirConstId ( 9 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 25 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 64 , false ) , ty ( 6 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 64 , false ) , ty ( 6 ) , _ ) ) + ListItem ( typedLocal ( Integer ( C , 64 , false ) , ty ( 6 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 64, false), ty ( 6 ) , ?_ )) + ?_ + + + _ => ?_ + + (ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) + ) + + + requires // invariant of the `Integer` constructor + 0 <=Int A + andBool A i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_add(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot b/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot new file mode 100644 index 000000000..079803cdd --- /dev/null +++ b/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_add"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + subgraph cluster_0 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_1 [label="_0"]; + Xecf30c325a77cae0_0 [label="Call\l"]; + Xecf30c325a77cae0_1 [label="Return\l"]; + } + Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_0: _1 [label=""]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xf28f42e91011344a_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X4f9055e3140841d0_0 -> X4f9055e3140841d0_1 [label="_5"]; + X4f9055e3140841d0_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X4f9055e3140841d0_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X4f9055e3140841d0_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_3 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X3d323724ddeb8015_0 -> X3d323724ddeb8015_1 [label="_0"]; + X3d323724ddeb8015_0 [label="Call\l"]; + X3d323724ddeb8015_1 -> X3d323724ddeb8015_2 [label="_2"]; + X3d323724ddeb8015_1 [label="Call\l"]; + X3d323724ddeb8015_2 [label="Return\l"]; + } + X3d323724ddeb8015_0 -> Xecf30c325a77cae0_0 [label="_1,const :: ()"]; + X3d323724ddeb8015_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_4 { + label="main"; + style="filled"; + color=palegreen; + X899bfc87e7e82e90_0 -> X899bfc87e7e82e90_1 [label="_3"]; + X899bfc87e7e82e90_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + X899bfc87e7e82e90_1 -> X899bfc87e7e82e90_2; + X899bfc87e7e82e90_1 [label="_6 <- chkd-Add(_1, _2)\lAssert _6.1 == false\l"]; + X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_6 [label="0"]; + X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_3 [label="other"]; + X899bfc87e7e82e90_2 [label="_5 <- Use(_6.0)\l_4 <- Lt(_5, const :: i16)\lSwitchInt _4\l"]; + X899bfc87e7e82e90_3 -> X899bfc87e7e82e90_4; + X899bfc87e7e82e90_3 [label="_9 <- chkd-Add(_1, _2)\lAssert _9.1 == false\l"]; + X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_6 [label="0"]; + X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_5 [label="other"]; + X899bfc87e7e82e90_4 [label="_8 <- Use(_9.0)\l_7 <- Gt(_8, const :: i16)\lSwitchInt _7\l"]; + X899bfc87e7e82e90_5 [label="Return\l"]; + X899bfc87e7e82e90_6 [label="Call\l"]; + } + X899bfc87e7e82e90_0 -> X7464f1e6ba435b2a_0 [label="_1,_2"]; + X899bfc87e7e82e90_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_5 { + label="core::num::::unchecked_add::prec\nondition_check"; + style="filled"; + color=lightgray; + X3f7834dda050e10_0 -> X3f7834dda050e10_2 [label="0"]; + X3f7834dda050e10_0 -> X3f7834dda050e10_1 [label="other"]; + X3f7834dda050e10_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Add(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + X3f7834dda050e10_1 [label="Call\l"]; + X3f7834dda050e10_2 [label="Return\l"]; + } + X3f7834dda050e10_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_3 [label="Cleanup"]; + Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_1 [label="_0"]; + Xade51bc3a8f52008_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xade51bc3a8f52008_1 -> Xade51bc3a8f52008_2; + Xade51bc3a8f52008_1 [label="Drop _1\l"]; + Xade51bc3a8f52008_2 [label="Return\l"]; + Xade51bc3a8f52008_3 -> Xade51bc3a8f52008_4; + Xade51bc3a8f52008_3 [label="Drop _1\l"]; + Xade51bc3a8f52008_4 [label="Resume\l"]; + } + Xade51bc3a8f52008_0 -> X48be982d2a4cc59b_0 [label="_3,_2"]; + subgraph cluster_7 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X9c80f3743f4f0c10_0 -> X9c80f3743f4f0c10_1 [label="_0"]; + X9c80f3743f4f0c10_0 [label="Call\l"]; + X9c80f3743f4f0c10_1 [label="Return\l"]; + } + X9c80f3743f4f0c10_0 -> Xade51bc3a8f52008_0 [label="_1*,_2"]; + subgraph cluster_8 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X7464f1e6ba435b2a_0 -> X7464f1e6ba435b2a_1 [label="_0"]; + X7464f1e6ba435b2a_0 [label="Call\l"]; + X7464f1e6ba435b2a_1 [label="Return\l"]; + } + X7464f1e6ba435b2a_0 -> X354cc96a778c463_0 [label="_1,_2"]; + subgraph cluster_9 { + label="core::num::::unchecked_add"; + style="filled"; + color=lightgray; + X354cc96a778c463_0 -> X354cc96a778c463_2 [label="0"]; + X354cc96a778c463_0 -> X354cc96a778c463_1 [label="other"]; + X354cc96a778c463_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + X354cc96a778c463_1 -> X354cc96a778c463_2 [label="_4"]; + X354cc96a778c463_1 [label="Call\l"]; + X354cc96a778c463_2 [label="Storage Dead _3\l_0 <- AddUnchecked(_1, _2)\lReturn\l"]; + } + X354cc96a778c463_1 -> X3f7834dda050e10_0 [label="_1,_2"]; + subgraph cluster_10 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X5f7c0242b1a5f905_0 [label="Return\l"]; + } + subgraph cluster_11 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X48be982d2a4cc59b_0 -> X48be982d2a4cc59b_1 [label="_3"]; + X48be982d2a4cc59b_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X48be982d2a4cc59b_1 -> X48be982d2a4cc59b_2 [label="_2"]; + X48be982d2a4cc59b_1 [label="Storage Dead _4\lCall\l"]; + X48be982d2a4cc59b_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X48be982d2a4cc59b_0 -> X3d323724ddeb8015_0 [label="_4"]; + X48be982d2a4cc59b_1 -> Xf28f42e91011344a_0 [label="_3"]; +} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json new file mode 100644 index 000000000..d98f99eae --- /dev/null +++ b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_add","crate_id":1100512358528492573,"allocs":[[2,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,97,100,100,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,43,32,98,32,60,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,43,32,98,32,62,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E"}],[35,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[32,{"NormalSym":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha7140c6faa1714efE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN13unchecked_add4main17hd8e1c5b7245124d4E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["AddUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file diff --git a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k new file mode 100644 index 000000000..1a4409143 --- /dev/null +++ b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k @@ -0,0 +1,76 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ) + + + requires // i16 invariants + 0 -Int (1 < i16::MAX) && (a * b < i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_mul(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot new file mode 100644 index 000000000..1fd26d6eb --- /dev/null +++ b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_mul"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X8f01db0e36395c71_0 -> X8f01db0e36395c71_1 [label="_0"]; + X8f01db0e36395c71_0 [label="Call\l"]; + X8f01db0e36395c71_1 [label="Return\l"]; + } + X8f01db0e36395c71_0 -> X8f01db0e36395c71_0: _1 [label=""]; + subgraph cluster_1 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X9e222efa6b726605_0 [label="Return\l"]; + } + subgraph cluster_2 { + label="core::num::::unchecked_mul"; + style="filled"; + color=lightgray; + Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_2 [label="0"]; + Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_1 [label="other"]; + Xeba6f5d5a379e29a_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xeba6f5d5a379e29a_1 -> Xeba6f5d5a379e29a_2 [label="_4"]; + Xeba6f5d5a379e29a_1 [label="Call\l"]; + Xeba6f5d5a379e29a_2 [label="Storage Dead _3\l_0 <- MulUnchecked(_1, _2)\lReturn\l"]; + } + Xeba6f5d5a379e29a_1 -> X9b97bece994ebb51_0 [label="_1,_2"]; + subgraph cluster_3 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X62f87ed0bcd6b426_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_4 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X69af4523a03742d5_0 -> X69af4523a03742d5_1 [label="_3"]; + X69af4523a03742d5_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X69af4523a03742d5_1 -> X69af4523a03742d5_2 [label="_2"]; + X69af4523a03742d5_1 [label="Storage Dead _4\lCall\l"]; + X69af4523a03742d5_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X69af4523a03742d5_0 -> Xcb8fb0027af607b6_0 [label="_4"]; + X69af4523a03742d5_1 -> X62f87ed0bcd6b426_0 [label="_3"]; + subgraph cluster_5 { + label="core::num::::unchecked_mul::prec\nondition_check"; + style="filled"; + color=lightgray; + X9b97bece994ebb51_0 -> X9b97bece994ebb51_2 [label="0"]; + X9b97bece994ebb51_0 -> X9b97bece994ebb51_1 [label="other"]; + X9b97bece994ebb51_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Mul(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + X9b97bece994ebb51_1 [label="Call\l"]; + X9b97bece994ebb51_2 [label="Return\l"]; + } + X9b97bece994ebb51_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X797ddd37b7ea3b5e_0 -> X797ddd37b7ea3b5e_1 [label="_5"]; + X797ddd37b7ea3b5e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X797ddd37b7ea3b5e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X797ddd37b7ea3b5e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_7 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + Xcb8fb0027af607b6_0 -> Xcb8fb0027af607b6_1 [label="_0"]; + Xcb8fb0027af607b6_0 [label="Call\l"]; + Xcb8fb0027af607b6_1 -> Xcb8fb0027af607b6_2 [label="_2"]; + Xcb8fb0027af607b6_1 [label="Call\l"]; + Xcb8fb0027af607b6_2 [label="Return\l"]; + } + Xcb8fb0027af607b6_0 -> X8f01db0e36395c71_0 [label="_1,const :: ()"]; + Xcb8fb0027af607b6_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_8 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X201617fc87c04742_0 -> X201617fc87c04742_1 [label="_0"]; + X201617fc87c04742_0 [label="Call\l"]; + X201617fc87c04742_1 [label="Return\l"]; + } + X201617fc87c04742_0 -> X86afcabc1ac42f91_0 [label="_1*,_2"]; + subgraph cluster_9 { + label="main"; + style="filled"; + color=palegreen; + Xe63d82c3b46f3acf_0 -> Xe63d82c3b46f3acf_1 [label="_3"]; + Xe63d82c3b46f3acf_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + Xe63d82c3b46f3acf_1 -> Xe63d82c3b46f3acf_2; + Xe63d82c3b46f3acf_1 [label="_6 <- chkd-Mul(_1, _2)\lAssert _6.1 == false\l"]; + Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_6 [label="0"]; + Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_3 [label="other"]; + Xe63d82c3b46f3acf_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; + Xe63d82c3b46f3acf_3 -> Xe63d82c3b46f3acf_4; + Xe63d82c3b46f3acf_3 [label="_9 <- chkd-Mul(_1, _2)\lAssert _9.1 == false\l"]; + Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_6 [label="0"]; + Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_5 [label="other"]; + Xe63d82c3b46f3acf_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; + Xe63d82c3b46f3acf_5 [label="Return\l"]; + Xe63d82c3b46f3acf_6 [label="Call\l"]; + } + Xe63d82c3b46f3acf_0 -> Xbe62f93610b866bf_0 [label="_1,_2"]; + Xe63d82c3b46f3acf_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_3 [label="Cleanup"]; + X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_1 [label="_0"]; + X86afcabc1ac42f91_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X86afcabc1ac42f91_1 -> X86afcabc1ac42f91_2; + X86afcabc1ac42f91_1 [label="Drop _1\l"]; + X86afcabc1ac42f91_2 [label="Return\l"]; + X86afcabc1ac42f91_3 -> X86afcabc1ac42f91_4; + X86afcabc1ac42f91_3 [label="Drop _1\l"]; + X86afcabc1ac42f91_4 [label="Resume\l"]; + } + X86afcabc1ac42f91_0 -> X69af4523a03742d5_0 [label="_3,_2"]; + subgraph cluster_11 { + label="unchecked_op"; + style="filled"; + color=palegreen; + Xbe62f93610b866bf_0 -> Xbe62f93610b866bf_1 [label="_0"]; + Xbe62f93610b866bf_0 [label="Call\l"]; + Xbe62f93610b866bf_1 [label="Return\l"]; + } + Xbe62f93610b866bf_0 -> Xeba6f5d5a379e29a_0 [label="_1,_2"]; +} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json new file mode 100644 index 000000000..2d32d0103 --- /dev/null +++ b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_mul","crate_id":5290701492876642493,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,42,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,42,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,109,117,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E"}],[32,{"NormalSym":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE"}],[36,{"NoOpSym":""}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[20,{"IntrinsicSym":"black_box"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_mul4main17h0cc64cae78556d0bE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["MulUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hfdc6fe355496207dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null}],"types":[[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k new file mode 100644 index 000000000..53c28b48f --- /dev/null +++ b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k @@ -0,0 +1,74 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 -Int (1 < i16 { + let unchecked_res = unsafe { a.unchecked_neg() }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot new file mode 100644 index 000000000..f0e5d18e2 --- /dev/null +++ b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot @@ -0,0 +1,137 @@ +digraph { + label="unchecked_neg"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8fc2060ad58510d8_0 [label="Intr: \ncold_path", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="core::num::::unchecked_neg::prec\nondition_check"; + style="filled"; + color=lightgray; + X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_3 [label="0"]; + X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_1 [label="other"]; + X4dfedea7d15dfae0_0 [label="Storage Live _3\l_3 <- Eq(_1, const :: i16)\lSwitchInt _3\l"]; + X4dfedea7d15dfae0_1 -> X4dfedea7d15dfae0_2 [label="_4"]; + X4dfedea7d15dfae0_1 [label="Call\l"]; + X4dfedea7d15dfae0_2 [label="Storage Dead _3\lCall\l"]; + X4dfedea7d15dfae0_3 [label="Storage Dead _3\lReturn\l"]; + } + X4dfedea7d15dfae0_1 -> X8fc2060ad58510d8_0 [label=""]; + X4dfedea7d15dfae0_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_1 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xc472594511031ccd_0 [label="Return\l"]; + } + subgraph cluster_2 { + label="main"; + style="filled"; + color=palegreen; + X83ac00eefa6b73fd_0 -> X83ac00eefa6b73fd_1 [label="_1"]; + X83ac00eefa6b73fd_0 [label="_2 <- Use(const :: i16)\lCall\l"]; + X83ac00eefa6b73fd_1 [label="Return\l"]; + } + X83ac00eefa6b73fd_0 -> X25395281e54f77f2_0 [label="_2"]; + subgraph cluster_3 { + label="std::intrinsics::cold_pat\nh"; + style="filled"; + color=lightgray; + X3664cff3ef814fcc_0 [label="Return\l"]; + } + subgraph cluster_4 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X1e8170c41331abcf_0 -> X1e8170c41331abcf_1 [label="_3"]; + X1e8170c41331abcf_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X1e8170c41331abcf_1 -> X1e8170c41331abcf_2 [label="_2"]; + X1e8170c41331abcf_1 [label="Storage Dead _4\lCall\l"]; + X1e8170c41331abcf_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X1e8170c41331abcf_0 -> Xfd6302c9a18672af_0 [label="_4"]; + X1e8170c41331abcf_1 -> Xd2fa5dcfbfecedff_0 [label="_3"]; + subgraph cluster_5 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + Xfd6302c9a18672af_0 -> Xfd6302c9a18672af_1 [label="_0"]; + Xfd6302c9a18672af_0 [label="Call\l"]; + Xfd6302c9a18672af_1 -> Xfd6302c9a18672af_2 [label="_2"]; + Xfd6302c9a18672af_1 [label="Call\l"]; + Xfd6302c9a18672af_2 [label="Return\l"]; + } + Xfd6302c9a18672af_0 -> Xab2b2ee52cc1a3b6_0 [label="_1,const :: ()"]; + Xfd6302c9a18672af_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_6 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X25395281e54f77f2_0 -> X25395281e54f77f2_1 [label="_0"]; + X25395281e54f77f2_0 [label="Call\l"]; + X25395281e54f77f2_1 [label="Return\l"]; + } + X25395281e54f77f2_0 -> X36f7f4bce11fe0f_0 [label="_1"]; + subgraph cluster_7 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xd2fa5dcfbfecedff_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_8 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_1 [label="_0"]; + Xab2b2ee52cc1a3b6_0 [label="Call\l"]; + Xab2b2ee52cc1a3b6_1 [label="Return\l"]; + } + Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_0: _1 [label=""]; + subgraph cluster_9 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xa028f493aff12071_0 -> Xa028f493aff12071_1 [label="_0"]; + Xa028f493aff12071_0 [label="Call\l"]; + Xa028f493aff12071_1 [label="Return\l"]; + } + Xa028f493aff12071_0 -> X39f0dcc2beb3cbfc_0 [label="_1*,_2"]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_3 [label="Cleanup"]; + X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_1 [label="_0"]; + X39f0dcc2beb3cbfc_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X39f0dcc2beb3cbfc_1 -> X39f0dcc2beb3cbfc_2; + X39f0dcc2beb3cbfc_1 [label="Drop _1\l"]; + X39f0dcc2beb3cbfc_2 [label="Return\l"]; + X39f0dcc2beb3cbfc_3 -> X39f0dcc2beb3cbfc_4; + X39f0dcc2beb3cbfc_3 [label="Drop _1\l"]; + X39f0dcc2beb3cbfc_4 [label="Resume\l"]; + } + X39f0dcc2beb3cbfc_0 -> X1e8170c41331abcf_0 [label="_3,_2"]; + subgraph cluster_11 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X1752551397e242d3_0 -> X1752551397e242d3_1 [label="_5"]; + X1752551397e242d3_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X1752551397e242d3_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X1752551397e242d3_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_12 { + label="core::num::::unchecked_neg"; + style="filled"; + color=lightgray; + X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_2 [label="0"]; + X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_1 [label="other"]; + X36f7f4bce11fe0f_0 [label="Storage Live _2\l_2 <- UbChecks :: bool\lSwitchInt _2\l"]; + X36f7f4bce11fe0f_1 -> X36f7f4bce11fe0f_2 [label="_3"]; + X36f7f4bce11fe0f_1 [label="Call\l"]; + X36f7f4bce11fe0f_2 [label="Storage Dead _2\l_0 <- SubUnchecked(const :: i16, _1)\lReturn\l"]; + } + X36f7f4bce11fe0f_1 -> X4dfedea7d15dfae0_0 [label="_1"]; +} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json new file mode 100644 index 000000000..ec557301f --- /dev/null +++ b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_neg","crate_id":8515610171801290459,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,110,101,103,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E"}],[32,{"NormalSym":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE"}],[24,{"IntrinsicSym":"cold_path"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":46},{"kind":{"Assign":[{"local":2,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":47}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":46}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":48,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":49}},{"statements":[{"kind":{"StorageDead":2},"span":51},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":7}}},{"Copy":{"local":1,"projection":[]}}]}]},"span":53}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":23,"span":54,"mutability":"Mut"},{"ty":23,"span":55,"mutability":"Not"},{"ty":21,"span":46,"mutability":"Mut"},{"ty":1,"span":49,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":55,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":56}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":14}}}}]},"span":75}],"terminator":{"kind":"Return","span":74}}],"locals":[{"ty":17,"span":76,"mutability":"Mut"},{"ty":1,"span":77,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":77,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":78}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg4main17h279e62d4b439df5fE","mono_item_kind":{"MonoItemFn":{"name":"main","id":9,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}}]},"span":82}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":15}}},"args":[{"Move":{"local":2,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":80}},{"statements":[],"terminator":{"kind":"Return","span":83}}],"locals":[{"ty":1,"span":84,"mutability":"Mut"},{"ty":23,"span":85,"mutability":"Not"},{"ty":23,"span":82,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":86,"scope":1},"composite":null,"value":{"Const":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}},"argument_index":null},{"name":"result","source_info":{"span":85,"scope":2},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":87}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":72}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":13}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":72}},{"statements":[],"terminator":{"kind":"Resume","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":12,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"},{"ty":31,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg::precondition_check","id":5,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":58},{"kind":{"Assign":[{"local":3,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":8}}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,3]],"otherwise":1}}},"span":57}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":9}}},"args":[],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":61}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":62,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":10}}},"args":[{"Constant":{"span":63,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}],"destination":{"local":2,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":64}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":1,"span":67,"mutability":"Mut"},{"ty":23,"span":68,"mutability":"Not"},{"ty":27,"span":64,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Mut"},{"ty":1,"span":61,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"lhs","source_info":{"span":68,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":69,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":70,"scope":2},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":71}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":12}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":29,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":1,"span":72,"mutability":"Mut"},{"ty":7,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":10,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":88,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":89}},{"statements":[],"terminator":{"kind":"Return","span":90}}],"locals":[{"ty":23,"span":91,"mutability":"Mut"},{"ty":23,"span":92,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"a","source_info":{"span":92,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"unchecked_res","source_info":{"span":93,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":94}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE","mono_item_kind":{"MonoItemFn":{"name":"std::intrinsics::cold_path","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":45}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":7,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":73}}],"locals":[{"ty":1,"span":73,"mutability":"Mut"},{"ty":29,"span":73,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":73}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[21,{"RigidTy":"Bool"}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k new file mode 100644 index 000000000..fd3debd5e --- /dev/null +++ b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k @@ -0,0 +1,72 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 79 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 15 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) .Bodies ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 -Int (1 < + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 71 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 13 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 -Int (1 < i16 { + let unchecked_res = unsafe { a.unchecked_shl(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot new file mode 100644 index 000000000..b621a4e00 --- /dev/null +++ b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot @@ -0,0 +1,127 @@ +digraph { + label="unchecked_shl"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + subgraph cluster_0 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X7ca0ff879d4d13eb_0 -> X7ca0ff879d4d13eb_1 [label="_0"]; + X7ca0ff879d4d13eb_0 [label="Call\l"]; + X7ca0ff879d4d13eb_1 [label="Return\l"]; + } + X7ca0ff879d4d13eb_0 -> Xf64250b1070257e5_0 [label="_1*,_2"]; + subgraph cluster_1 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_1 [label="_0"]; + Xca73baf8b721e82c_0 [label="Call\l"]; + Xca73baf8b721e82c_1 [label="Return\l"]; + } + Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_0: _1 [label=""]; + subgraph cluster_2 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X6985b604fd3ae6be_0 -> X6985b604fd3ae6be_1 [label="_0"]; + X6985b604fd3ae6be_0 [label="Call\l"]; + X6985b604fd3ae6be_1 [label="Return\l"]; + } + X6985b604fd3ae6be_0 -> Xe1c01b35d6c2026f_0 [label="_1,_2"]; + subgraph cluster_3 { + label="core::num::::unchecked_shl"; + style="filled"; + color=lightgray; + Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_2 [label="0"]; + Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_1 [label="other"]; + Xe1c01b35d6c2026f_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xe1c01b35d6c2026f_1 -> Xe1c01b35d6c2026f_2 [label="_4"]; + Xe1c01b35d6c2026f_1 [label="Call\l"]; + Xe1c01b35d6c2026f_2 [label="Storage Dead _3\l_0 <- ShlUnchecked(_1, _2)\lReturn\l"]; + } + Xe1c01b35d6c2026f_1 -> X739610367822bd9b_0 [label="_2"]; + subgraph cluster_4 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xf64250b1070257e5_0 -> Xf64250b1070257e5_3 [label="Cleanup"]; + Xf64250b1070257e5_0 -> Xf64250b1070257e5_1 [label="_0"]; + Xf64250b1070257e5_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xf64250b1070257e5_1 -> Xf64250b1070257e5_2; + Xf64250b1070257e5_1 [label="Drop _1\l"]; + Xf64250b1070257e5_2 [label="Return\l"]; + Xf64250b1070257e5_3 -> Xf64250b1070257e5_4; + Xf64250b1070257e5_3 [label="Drop _1\l"]; + Xf64250b1070257e5_4 [label="Resume\l"]; + } + Xf64250b1070257e5_0 -> X8c1d75f364744448_0 [label="_3,_2"]; + subgraph cluster_5 { + label="core::num::::unchecked_shl::prec\nondition_check"; + style="filled"; + color=lightgray; + X739610367822bd9b_0 -> X739610367822bd9b_2 [label="0"]; + X739610367822bd9b_0 -> X739610367822bd9b_1 [label="other"]; + X739610367822bd9b_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; + X739610367822bd9b_1 [label="Storage Dead _2\lReturn\l"]; + X739610367822bd9b_2 [label="Call\l"]; + } + X739610367822bd9b_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X8c1d75f364744448_0 -> X8c1d75f364744448_1 [label="_3"]; + X8c1d75f364744448_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X8c1d75f364744448_1 -> X8c1d75f364744448_2 [label="_2"]; + X8c1d75f364744448_1 [label="Storage Dead _4\lCall\l"]; + X8c1d75f364744448_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X8c1d75f364744448_0 -> X92deb757c4463693_0 [label="_4"]; + X8c1d75f364744448_1 -> X9e057dae70d0b216_0 [label="_3"]; + subgraph cluster_7 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xebd6923e157bf244_0 [label="Return\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + Xd9564944a8357ebc_0 -> Xd9564944a8357ebc_1 [label="_5"]; + Xd9564944a8357ebc_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + Xd9564944a8357ebc_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + Xd9564944a8357ebc_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_9 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X92deb757c4463693_0 -> X92deb757c4463693_1 [label="_0"]; + X92deb757c4463693_0 [label="Call\l"]; + X92deb757c4463693_1 -> X92deb757c4463693_2 [label="_2"]; + X92deb757c4463693_1 [label="Call\l"]; + X92deb757c4463693_2 [label="Return\l"]; + } + X92deb757c4463693_0 -> Xca73baf8b721e82c_0 [label="_1,const :: ()"]; + X92deb757c4463693_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_10 { + label="main"; + style="filled"; + color=palegreen; + Xb244b26227a3c207_0 -> Xb244b26227a3c207_1 [label="_1"]; + Xb244b26227a3c207_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; + Xb244b26227a3c207_1 [label="Return\l"]; + } + Xb244b26227a3c207_0 -> X6985b604fd3ae6be_0 [label="_2,_3"]; + subgraph cluster_11 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X9e057dae70d0b216_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } +} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json new file mode 100644 index 000000000..8dae9a816 --- /dev/null +++ b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_shl","crate_id":2438242285894030786,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E"}],[32,{"NormalSym":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h4b70c8118c54af25E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl4main17h99915c6a84d89e82E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShlUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k new file mode 100644 index 000000000..440d6e604 --- /dev/null +++ b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k @@ -0,0 +1,74 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 71 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 13 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 -Int (1 < i16 { + let unchecked_res = unsafe { a.unchecked_shr(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot new file mode 100644 index 000000000..4bfe94015 --- /dev/null +++ b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot @@ -0,0 +1,127 @@ +digraph { + label="unchecked_shr"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + subgraph cluster_0 { + label="core::num::::unchecked_shr"; + style="filled"; + color=lightgray; + X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_2 [label="0"]; + X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_1 [label="other"]; + X3dfb10421593b1e8_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + X3dfb10421593b1e8_1 -> X3dfb10421593b1e8_2 [label="_4"]; + X3dfb10421593b1e8_1 [label="Call\l"]; + X3dfb10421593b1e8_2 [label="Storage Dead _3\l_0 <- ShrUnchecked(_1, _2)\lReturn\l"]; + } + X3dfb10421593b1e8_1 -> X67406d0b881e84da_0 [label="_2"]; + subgraph cluster_1 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X1fcbbfbc6742d998_0 -> X1fcbbfbc6742d998_1 [label="_5"]; + X1fcbbfbc6742d998_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X1fcbbfbc6742d998_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X1fcbbfbc6742d998_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_2 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X2ea79ec23c0f6969_0 -> X2ea79ec23c0f6969_1 [label="_0"]; + X2ea79ec23c0f6969_0 [label="Call\l"]; + X2ea79ec23c0f6969_1 [label="Return\l"]; + } + X2ea79ec23c0f6969_0 -> X3dfb10421593b1e8_0 [label="_1,_2"]; + subgraph cluster_3 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X308478c52589b452_0 -> X308478c52589b452_1 [label="_0"]; + X308478c52589b452_0 [label="Call\l"]; + X308478c52589b452_1 [label="Return\l"]; + } + X308478c52589b452_0 -> X308478c52589b452_0: _1 [label=""]; + subgraph cluster_4 { + label="main"; + style="filled"; + color=palegreen; + X74e505ee082dcd3c_0 -> X74e505ee082dcd3c_1 [label="_1"]; + X74e505ee082dcd3c_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; + X74e505ee082dcd3c_1 [label="Return\l"]; + } + X74e505ee082dcd3c_0 -> X2ea79ec23c0f6969_0 [label="_2,_3"]; + subgraph cluster_5 { + label="core::num::::unchecked_shr::prec\nondition_check"; + style="filled"; + color=lightgray; + X67406d0b881e84da_0 -> X67406d0b881e84da_2 [label="0"]; + X67406d0b881e84da_0 -> X67406d0b881e84da_1 [label="other"]; + X67406d0b881e84da_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; + X67406d0b881e84da_1 [label="Storage Dead _2\lReturn\l"]; + X67406d0b881e84da_2 [label="Call\l"]; + } + X67406d0b881e84da_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X63a912d85dcf5dbc_0 -> X63a912d85dcf5dbc_1 [label="_0"]; + X63a912d85dcf5dbc_0 [label="Call\l"]; + X63a912d85dcf5dbc_1 [label="Return\l"]; + } + X63a912d85dcf5dbc_0 -> Xc86fbb6bb8f835bf_0 [label="_1*,_2"]; + subgraph cluster_7 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X8f6613fb2e5e284f_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + Xc5c68a464c01d1d6_0 -> Xc5c68a464c01d1d6_1 [label="_3"]; + Xc5c68a464c01d1d6_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + Xc5c68a464c01d1d6_1 -> Xc5c68a464c01d1d6_2 [label="_2"]; + Xc5c68a464c01d1d6_1 [label="Storage Dead _4\lCall\l"]; + Xc5c68a464c01d1d6_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xc5c68a464c01d1d6_0 -> X418d756885456e9e_0 [label="_4"]; + Xc5c68a464c01d1d6_1 -> X8f6613fb2e5e284f_0 [label="_3"]; + subgraph cluster_9 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xa8d344f9e18404f4_0 [label="Return\l"]; + } + subgraph cluster_10 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X418d756885456e9e_0 -> X418d756885456e9e_1 [label="_0"]; + X418d756885456e9e_0 [label="Call\l"]; + X418d756885456e9e_1 -> X418d756885456e9e_2 [label="_2"]; + X418d756885456e9e_1 [label="Call\l"]; + X418d756885456e9e_2 [label="Return\l"]; + } + X418d756885456e9e_0 -> X308478c52589b452_0 [label="_1,const :: ()"]; + X418d756885456e9e_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_11 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_3 [label="Cleanup"]; + Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_1 [label="_0"]; + Xc86fbb6bb8f835bf_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xc86fbb6bb8f835bf_1 -> Xc86fbb6bb8f835bf_2; + Xc86fbb6bb8f835bf_1 [label="Drop _1\l"]; + Xc86fbb6bb8f835bf_2 [label="Return\l"]; + Xc86fbb6bb8f835bf_3 -> Xc86fbb6bb8f835bf_4; + Xc86fbb6bb8f835bf_3 [label="Drop _1\l"]; + Xc86fbb6bb8f835bf_4 [label="Resume\l"]; + } + Xc86fbb6bb8f835bf_0 -> Xc5c68a464c01d1d6_0 [label="_3,_2"]; +} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json new file mode 100644 index 000000000..dba54586c --- /dev/null +++ b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_shr","crate_id":11374706484823853070,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,114,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E"}],[20,{"IntrinsicSym":"black_box"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E"}],[32,{"NormalSym":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hd2b815e8bd96d253E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShrUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k new file mode 100644 index 000000000..3548b9553 --- /dev/null +++ b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k @@ -0,0 +1,74 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ) + + requires // i16 invariants + 0 -Int (1 < i16::MAX) && (a - b < i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_sub(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot new file mode 100644 index 000000000..7dd70579e --- /dev/null +++ b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_sub"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X6ed7f5222f8fff3d_0 -> X6ed7f5222f8fff3d_1 [label="_0"]; + X6ed7f5222f8fff3d_0 [label="Call\l"]; + X6ed7f5222f8fff3d_1 -> X6ed7f5222f8fff3d_2 [label="_2"]; + X6ed7f5222f8fff3d_1 [label="Call\l"]; + X6ed7f5222f8fff3d_2 [label="Return\l"]; + } + X6ed7f5222f8fff3d_0 -> X2c1ab9ccb2ee2902_0 [label="_1,const :: ()"]; + X6ed7f5222f8fff3d_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xb356150a39730498_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="core::num::::unchecked_sub"; + style="filled"; + color=lightgray; + Xe89ce436dda28930_0 -> Xe89ce436dda28930_2 [label="0"]; + Xe89ce436dda28930_0 -> Xe89ce436dda28930_1 [label="other"]; + Xe89ce436dda28930_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xe89ce436dda28930_1 -> Xe89ce436dda28930_2 [label="_4"]; + Xe89ce436dda28930_1 [label="Call\l"]; + Xe89ce436dda28930_2 [label="Storage Dead _3\l_0 <- SubUnchecked(_1, _2)\lReturn\l"]; + } + Xe89ce436dda28930_1 -> Xd6d8542b139753eb_0 [label="_1,_2"]; + subgraph cluster_3 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X4d9411a803faadfe_0 -> X4d9411a803faadfe_3 [label="Cleanup"]; + X4d9411a803faadfe_0 -> X4d9411a803faadfe_1 [label="_0"]; + X4d9411a803faadfe_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X4d9411a803faadfe_1 -> X4d9411a803faadfe_2; + X4d9411a803faadfe_1 [label="Drop _1\l"]; + X4d9411a803faadfe_2 [label="Return\l"]; + X4d9411a803faadfe_3 -> X4d9411a803faadfe_4; + X4d9411a803faadfe_3 [label="Drop _1\l"]; + X4d9411a803faadfe_4 [label="Resume\l"]; + } + X4d9411a803faadfe_0 -> X396121085053712_0 [label="_3,_2"]; + subgraph cluster_4 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_1 [label="_0"]; + X2c1ab9ccb2ee2902_0 [label="Call\l"]; + X2c1ab9ccb2ee2902_1 [label="Return\l"]; + } + X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_0: _1 [label=""]; + subgraph cluster_5 { + label="main"; + style="filled"; + color=palegreen; + X4f441ab82149a815_0 -> X4f441ab82149a815_1 [label="_3"]; + X4f441ab82149a815_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + X4f441ab82149a815_1 -> X4f441ab82149a815_2; + X4f441ab82149a815_1 [label="_6 <- chkd-Sub(_1, _2)\lAssert _6.1 == false\l"]; + X4f441ab82149a815_2 -> X4f441ab82149a815_6 [label="0"]; + X4f441ab82149a815_2 -> X4f441ab82149a815_3 [label="other"]; + X4f441ab82149a815_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; + X4f441ab82149a815_3 -> X4f441ab82149a815_4; + X4f441ab82149a815_3 [label="_9 <- chkd-Sub(_1, _2)\lAssert _9.1 == false\l"]; + X4f441ab82149a815_4 -> X4f441ab82149a815_6 [label="0"]; + X4f441ab82149a815_4 -> X4f441ab82149a815_5 [label="other"]; + X4f441ab82149a815_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; + X4f441ab82149a815_5 [label="Return\l"]; + X4f441ab82149a815_6 [label="Call\l"]; + } + X4f441ab82149a815_0 -> X949dd9980f2a3388_0 [label="_1,_2"]; + X4f441ab82149a815_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_6 { + label="core::num::::unchecked_sub::prec\nondition_check"; + style="filled"; + color=lightgray; + Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_2 [label="0"]; + Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_1 [label="other"]; + Xd6d8542b139753eb_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Sub(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + Xd6d8542b139753eb_1 [label="Call\l"]; + Xd6d8542b139753eb_2 [label="Return\l"]; + } + Xd6d8542b139753eb_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_7 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X396121085053712_0 -> X396121085053712_1 [label="_3"]; + X396121085053712_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X396121085053712_1 -> X396121085053712_2 [label="_2"]; + X396121085053712_1 [label="Storage Dead _4\lCall\l"]; + X396121085053712_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X396121085053712_0 -> X6ed7f5222f8fff3d_0 [label="_4"]; + X396121085053712_1 -> Xb356150a39730498_0 [label="_3"]; + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X3d6480ec228be4ec_0 -> X3d6480ec228be4ec_1 [label="_5"]; + X3d6480ec228be4ec_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X3d6480ec228be4ec_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X3d6480ec228be4ec_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_9 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X949dd9980f2a3388_0 -> X949dd9980f2a3388_1 [label="_0"]; + X949dd9980f2a3388_0 [label="Call\l"]; + X949dd9980f2a3388_1 [label="Return\l"]; + } + X949dd9980f2a3388_0 -> Xe89ce436dda28930_0 [label="_1,_2"]; + subgraph cluster_10 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X7cb88635fb24da5a_0 [label="Return\l"]; + } + subgraph cluster_11 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X41331acabe05b18d_0 -> X41331acabe05b18d_1 [label="_0"]; + X41331acabe05b18d_0 [label="Call\l"]; + X41331acabe05b18d_1 [label="Return\l"]; + } + X41331acabe05b18d_0 -> X4d9411a803faadfe_0 [label="_1*,_2"]; +} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json new file mode 100644 index 000000000..ae8aeea5f --- /dev/null +++ b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json @@ -0,0 +1 @@ +{"name":"unchecked_sub","crate_id":17961444647620661476,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,45,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,45,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,117,98,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[20,{"IntrinsicSym":"black_box"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E"}],[32,{"NormalSym":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub4main17h289393681834f0fcE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h233dfbd9029fc4f7E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null}],"types":[[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[9,{"RigidTy":{"Uint":"U8"}}]],"debug":null} \ No newline at end of file From 1819def655c24ffeb869f1086c541a0fcf61f392 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 19:06:21 -0300 Subject: [PATCH 08/84] Removing scratch --- scratch/maximum-proof/README.md | 96 ------------ scratch/maximum-proof/main-max-with-lt.rs | 18 --- .../maximum-proof/main-max-with-lt.smir.dot | 135 ----------------- .../maximum-proof/main-max-with-lt.smir.json | 1 - scratch/maximum-proof/maximum-spec.k | 74 --------- scratch/unchecked_add/unchecked-add.rs | 14 -- scratch/unchecked_add/unchecked-add.smir.dot | 140 ------------------ scratch/unchecked_add/unchecked-add.smir.json | 1 - scratch/unchecked_add/unchecked-op-spec.k | 76 ---------- scratch/unchecked_mul/unchecked-mul.rs | 14 -- scratch/unchecked_mul/unchecked-mul.smir.dot | 140 ------------------ scratch/unchecked_mul/unchecked-mul.smir.json | 1 - scratch/unchecked_mul/unchecked-op-spec.k | 74 --------- scratch/unchecked_neg/unchecked-neg.rs | 12 -- scratch/unchecked_neg/unchecked-neg.smir.dot | 137 ----------------- scratch/unchecked_neg/unchecked-neg.smir.json | 1 - scratch/unchecked_neg/unchecked-op-spec.k | 72 --------- scratch/unchecked_shl/unchecked-op-spec.k | 74 --------- scratch/unchecked_shl/unchecked-shl.rs | 13 -- scratch/unchecked_shl/unchecked-shl.smir.dot | 127 ---------------- scratch/unchecked_shl/unchecked-shl.smir.json | 1 - scratch/unchecked_shr/unchecked-op-spec.k | 74 --------- scratch/unchecked_shr/unchecked-shr.rs | 13 -- scratch/unchecked_shr/unchecked-shr.smir.dot | 127 ---------------- scratch/unchecked_shr/unchecked-shr.smir.json | 1 - scratch/unchecked_sub/unchecked-op-spec.k | 74 --------- scratch/unchecked_sub/unchecked-sub.rs | 14 -- scratch/unchecked_sub/unchecked-sub.smir.dot | 140 ------------------ scratch/unchecked_sub/unchecked-sub.smir.json | 1 - 29 files changed, 1665 deletions(-) delete mode 100644 scratch/maximum-proof/README.md delete mode 100644 scratch/maximum-proof/main-max-with-lt.rs delete mode 100644 scratch/maximum-proof/main-max-with-lt.smir.dot delete mode 100644 scratch/maximum-proof/main-max-with-lt.smir.json delete mode 100644 scratch/maximum-proof/maximum-spec.k delete mode 100644 scratch/unchecked_add/unchecked-add.rs delete mode 100644 scratch/unchecked_add/unchecked-add.smir.dot delete mode 100644 scratch/unchecked_add/unchecked-add.smir.json delete mode 100644 scratch/unchecked_add/unchecked-op-spec.k delete mode 100644 scratch/unchecked_mul/unchecked-mul.rs delete mode 100644 scratch/unchecked_mul/unchecked-mul.smir.dot delete mode 100644 scratch/unchecked_mul/unchecked-mul.smir.json delete mode 100644 scratch/unchecked_mul/unchecked-op-spec.k delete mode 100644 scratch/unchecked_neg/unchecked-neg.rs delete mode 100644 scratch/unchecked_neg/unchecked-neg.smir.dot delete mode 100644 scratch/unchecked_neg/unchecked-neg.smir.json delete mode 100644 scratch/unchecked_neg/unchecked-op-spec.k delete mode 100644 scratch/unchecked_shl/unchecked-op-spec.k delete mode 100644 scratch/unchecked_shl/unchecked-shl.rs delete mode 100644 scratch/unchecked_shl/unchecked-shl.smir.dot delete mode 100644 scratch/unchecked_shl/unchecked-shl.smir.json delete mode 100644 scratch/unchecked_shr/unchecked-op-spec.k delete mode 100644 scratch/unchecked_shr/unchecked-shr.rs delete mode 100644 scratch/unchecked_shr/unchecked-shr.smir.dot delete mode 100644 scratch/unchecked_shr/unchecked-shr.smir.json delete mode 100644 scratch/unchecked_sub/unchecked-op-spec.k delete mode 100644 scratch/unchecked_sub/unchecked-sub.rs delete mode 100644 scratch/unchecked_sub/unchecked-sub.smir.dot delete mode 100644 scratch/unchecked_sub/unchecked-sub.smir.json diff --git a/scratch/maximum-proof/README.md b/scratch/maximum-proof/README.md deleted file mode 100644 index ea565f7bf..000000000 --- a/scratch/maximum-proof/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# Turning the max-with-lt program into a property proof - -## Example program that we start from - -```rust -fn main() { - - let a:usize = 42; - let b:usize = -43; - let c:usize = 0; - - let result = maximum(a, b, c); - - assert!(result >= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: usize, b: usize, c: usize) -> usize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} -``` - -We want to prove a property of `maximum`: -- When called with `a`, `b`, and `c`, -- the `result` will be greater or equal all of the arguments, -- and equal to one (or more) of them. - -The `main` program above states this using some concrete values of `a`, `b`, and `c`. We will run this program to construct a general symbolic claim and prove it. - -In a future version, we will be able to start directly with the `maximum` function call and provide symbolic arguments to it. This will save some manual work setting up the claim file and fits the target of proving based on property tests. - -## Extracting Stable MIR for the program - -Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. - -```shell -maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs -``` -The Stable MIR for the program can also be rendered as a graph, using the `--dot` option. This creates `main-max-with-lt.smir.dot`. - -```shell -maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs -``` -## Constructing the claim by executing `main` to certain points - -1. The program (`main`) reaches the call to `maximum` after 22 steps. - The following command runs it and displays the resulting program state. - - ```shell - maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S - ``` - - Arguments `a`, `b`, and `c` are initialised to `Integer`s as `locals[1]` to `locals[3]` - - A `call` terminator calling function `ty(25)` is executed next (front of the `k` cell) - - The function table contains `ty(25) -> "maximum" code. - - Other state (how `main` continues, its other local variables, and some internal functions) is relevant to the proof we want to perform. -2. The program executes for a total of 92 steps to reach the point where it `return`s from `maximum`. - The following command runs it and displays the resulting program state. - - ```shell - maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S - ``` - - The value `locals[0]` is now set to an `Integer`. This will be the target of our assertions. - - A `return` terminator is executed next (front of the `k` cell), it will return `locals[0]` - - It should be an `Integer` with the desired properties as stated above - -State 1. defines our start state for the claim. Irrelevant parts are elided (replaced by variables). -* The code of the `maximum` function in the `functions` table needs to be kept. We also keep its identifier `ty(25)`. Other functions can be removed (we won't perform a return). -* The `call` terminator is kept, calling `ty(25)` with arguments from `locals[1,2,3]`. `target` is modified to be `noBasicBlockIdx` to force termination of the prover (no block to jump back to). -* The four locals `0` - `3` are required in their original order to provide the function arguments. The values of `a`, `b`, and `c` in locals `1` - `3` are replaced with symbolic variables used in the proof. -* We could keep all other locals but do not have to (however it is important that the list of locals has a known length). -* `main`s other details in `currentFrame` are irrelevant and elided. - - -State 2. is the end state, where all that matters is the returned value. - -* The `locals` list should contain this `?RESULT` value at index `0` -* The `?RESULT` value should have the properties stated (equivalent to the assertion in `main`) -* Because of the modified `target`, the program should end, i.e., have an `#EndProgram` in the `k` cell. - -The above is written as a _claim_ in K framework language into a `maximum-spec.k` file. -Most of the syntax can be copied from the output of the `kmir run` commands above, and irrelevant parts replaced by `_` (LHS) or `?_` (RHS). - -Alternatively, it is possible to construct a claim that the entire rest of the program after initialising the variables will result in the desired `?RESULT`, i.e., the assertion in `main` is executed successfully and the program ends in `#EndProgram` after checking it. This would require more steps. - -## Running the prover on the claim and viewing the proof -```shell -maximum-proof$ poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof -``` - -The proof steps are saved in the `$PWD/proof` directory for later inspection using `kmir prove view`. This is especially important when the proof does _not_ succeed immediately. - -```shell -maximum-proof$ poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof -``` diff --git a/scratch/maximum-proof/main-max-with-lt.rs b/scratch/maximum-proof/main-max-with-lt.rs deleted file mode 100644 index 25d54c526..000000000 --- a/scratch/maximum-proof/main-max-with-lt.rs +++ /dev/null @@ -1,18 +0,0 @@ - -fn main() { - - let a:isize = 42; - let b:isize = -43; - let c:isize = 0; - - let result = maximum(a, b, c); - - assert!(result >= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: isize, b: isize, c: isize) -> isize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} diff --git a/scratch/maximum-proof/main-max-with-lt.smir.dot b/scratch/maximum-proof/main-max-with-lt.smir.dot deleted file mode 100644 index d6a136c47..000000000 --- a/scratch/maximum-proof/main-max-with-lt.smir.dot +++ /dev/null @@ -1,135 +0,0 @@ -digraph { - label="main_max_with_lt"; - node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - subgraph cluster_0 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - Xb022926f55be7915_0 -> Xb022926f55be7915_1 [label="_3"]; - Xb022926f55be7915_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - Xb022926f55be7915_1 -> Xb022926f55be7915_2 [label="_2"]; - Xb022926f55be7915_1 [label="Storage Dead _4\lCall\l"]; - Xb022926f55be7915_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - Xb022926f55be7915_0 -> X86cc23a99438eb2_0 [label="_4"]; - Xb022926f55be7915_1 -> X20f17eb946604891_0 [label="_3"]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X20f17eb946604891_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_3 [label="Cleanup"]; - Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_1 [label="_0"]; - Xda86ab50b6674bf3_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xda86ab50b6674bf3_1 -> Xda86ab50b6674bf3_2; - Xda86ab50b6674bf3_1 [label="Drop _1\l"]; - Xda86ab50b6674bf3_2 [label="Return\l"]; - Xda86ab50b6674bf3_3 -> Xda86ab50b6674bf3_4; - Xda86ab50b6674bf3_3 [label="Drop _1\l"]; - Xda86ab50b6674bf3_4 [label="Resume\l"]; - } - Xda86ab50b6674bf3_0 -> Xb022926f55be7915_0 [label="_3,_2"]; - subgraph cluster_3 { - label="main"; - style="filled"; - color=palegreen; - X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="_4"]; - X37252ea5c5b3ce2a_0 [label="_1 <- Use(const :: isize)\l_2 <- Use(const :: isize)\l_3 <- Use(const :: isize)\lCall\l"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; - X37252ea5c5b3ce2a_1 [label="_5 <- Ge(_4, _1)\lSwitchInt _5\l"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; - X37252ea5c5b3ce2a_2 [label="_6 <- Ge(_4, _2)\lSwitchInt _6\l"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; - X37252ea5c5b3ce2a_3 [label="_7 <- Ge(_4, _3)\lSwitchInt _7\l"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_4 [label="_8 <- Eq(_4, _1)\lSwitchInt _8\l"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_5 [label="_9 <- Eq(_4, _2)\lSwitchInt _9\l"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_6 [label="_10 <- Eq(_4, _3)\lSwitchInt _10\l"]; - X37252ea5c5b3ce2a_7 [label="Call\l"]; - X37252ea5c5b3ce2a_8 [label="Return\l"]; - } - X37252ea5c5b3ce2a_0 -> X527779074a5fd21e_0 [label="_1,_2,_3"]; - X37252ea5c5b3ce2a_7 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_4 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X86cc23a99438eb2_0 -> X86cc23a99438eb2_1 [label="_0"]; - X86cc23a99438eb2_0 [label="Call\l"]; - X86cc23a99438eb2_1 -> X86cc23a99438eb2_2 [label="_2"]; - X86cc23a99438eb2_1 [label="Call\l"]; - X86cc23a99438eb2_2 [label="Return\l"]; - } - X86cc23a99438eb2_0 -> X2a67ec2487cf8e32_0 [label="_1,const :: ()"]; - X86cc23a99438eb2_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_5 { - label="maximum"; - style="filled"; - color=palegreen; - X527779074a5fd21e_0 -> X527779074a5fd21e_2 [label="0"]; - X527779074a5fd21e_0 -> X527779074a5fd21e_1 [label="other"]; - X527779074a5fd21e_0 [label="_5 <- Lt(_1, _2)\lSwitchInt _5\l"]; - X527779074a5fd21e_1 -> X527779074a5fd21e_3; - X527779074a5fd21e_1 [label="_4 <- Use(_2)\lGoto\l"]; - X527779074a5fd21e_2 -> X527779074a5fd21e_3; - X527779074a5fd21e_2 [label="_4 <- Use(_1)\lGoto\l"]; - X527779074a5fd21e_3 -> X527779074a5fd21e_5 [label="0"]; - X527779074a5fd21e_3 -> X527779074a5fd21e_4 [label="other"]; - X527779074a5fd21e_3 [label="_7 <- Use(_4)\l_6 <- Lt(_7, _3)\lSwitchInt _6\l"]; - X527779074a5fd21e_4 -> X527779074a5fd21e_6; - X527779074a5fd21e_4 [label="_0 <- Use(_3)\lGoto\l"]; - X527779074a5fd21e_5 -> X527779074a5fd21e_6; - X527779074a5fd21e_5 [label="_0 <- Use(_4)\lGoto\l"]; - X527779074a5fd21e_6 [label="Return\l"]; - } - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X34679ac96970715e_0 -> X34679ac96970715e_1 [label="_0"]; - X34679ac96970715e_0 [label="Call\l"]; - X34679ac96970715e_1 [label="Return\l"]; - } - X34679ac96970715e_0 -> Xda86ab50b6674bf3_0 [label="_1*,_2"]; - subgraph cluster_7 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xb149796b83f1b2e4_0 [label="Return\l"]; - } - subgraph cluster_8 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - Xc8323e8e5ef1862e_0 -> Xc8323e8e5ef1862e_1 [label="_5"]; - Xc8323e8e5ef1862e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - Xc8323e8e5ef1862e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - Xc8323e8e5ef1862e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_9 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_1 [label="_0"]; - X2a67ec2487cf8e32_0 [label="Call\l"]; - X2a67ec2487cf8e32_1 [label="Return\l"]; - } - X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_0: _1 [label=""]; -} diff --git a/scratch/maximum-proof/main-max-with-lt.smir.json b/scratch/maximum-proof/main-max-with-lt.smir.json deleted file mode 100644 index 847684ef6..000000000 --- a/scratch/maximum-proof/main-max-with-lt.smir.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"main_max_with_lt","crate_id":5373935543796547206,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116,32,62,61,32,97,32,38,38,32,114,101,115,117,108,116,32,62,61,32,98,32,38,38,32,114,101,115,117,108,116,32,62,61,32,99,32,38,38,10,32,32,32,32,40,114,101,115,117,108,116,32,61,61,32,97,32,124,124,32,114,101,115,117,108,116,32,61,61,32,98,32,124,124,32,114,101,115,117,108,116,32,61,61,32,99,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[30,{"NoOpSym":""}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE"}],[25,{"NormalSym":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE","mono_item_kind":{"MonoItemFn":{"name":"maximum","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":69}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":69}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[]}}}]},"span":71}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[]}}}]},"span":72}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":74},{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":7,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":73}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":4}}},"span":73}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":3,"projection":[]}}}]},"span":76}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":77}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[],"terminator":{"kind":"Return","span":78}}],"locals":[{"ty":6,"span":79,"mutability":"Mut"},{"ty":6,"span":80,"mutability":"Not"},{"ty":6,"span":81,"mutability":"Not"},{"ty":6,"span":82,"mutability":"Not"},{"ty":6,"span":83,"mutability":"Not"},{"ty":28,"span":69,"mutability":"Mut"},{"ty":28,"span":73,"mutability":"Mut"},{"ty":6,"span":74,"mutability":"Mut"}],"arg_count":3,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":81,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"c","source_info":{"span":82,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"max_ab","source_info":{"span":83,"scope":1},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":84}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN16main_max_with_lt4main17h96bac61ef98236a2E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255,255,255,255,255,255,255],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":11}}}}]},"span":53},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":12}}}}]},"span":54}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}},{"Copy":{"local":3,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":1,"unwind":"Continue"}},"span":51}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":2}}},"span":55}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":3}}},"span":56}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":57}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":4}}},"span":57}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":8,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":8}}},"span":58}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":59}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":9,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":8}}},"span":59}},{"statements":[{"kind":{"Assign":[{"local":10,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":60}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":10,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":8}}},"span":60}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":61,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":13}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":14}}}],"destination":{"local":11,"projection":[]},"target":null,"unwind":"Continue"}},"span":61}},{"statements":[],"terminator":{"kind":"Return","span":62}}],"locals":[{"ty":1,"span":63,"mutability":"Mut"},{"ty":6,"span":64,"mutability":"Not"},{"ty":6,"span":65,"mutability":"Not"},{"ty":6,"span":66,"mutability":"Not"},{"ty":6,"span":67,"mutability":"Not"},{"ty":28,"span":55,"mutability":"Mut"},{"ty":28,"span":56,"mutability":"Mut"},{"ty":28,"span":57,"mutability":"Mut"},{"ty":28,"span":58,"mutability":"Mut"},{"ty":28,"span":59,"mutability":"Mut"},{"ty":28,"span":60,"mutability":"Mut"},{"ty":29,"span":61,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":64,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":65,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":66,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":67,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17he1705726abca17eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h563c9dfa7d67f6e6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5364b7b343208af1E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[28,{"RigidTy":"Bool"}]],"debug":null} \ No newline at end of file diff --git a/scratch/maximum-proof/maximum-spec.k b/scratch/maximum-proof/maximum-spec.k deleted file mode 100644 index 4474fac6e..000000000 --- a/scratch/maximum-proof/maximum-spec.k +++ /dev/null @@ -1,74 +0,0 @@ -module MAXIMUM-SPEC - imports KMIR - - claim [maximum-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 50 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 25 ) , // <- this is the reference to `maximum` - id: mirConstId ( 9 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 25 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 64 , false ) , ty ( 6 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 64 , false ) , ty ( 6 ) , _ ) ) - ListItem ( typedLocal ( Integer ( C , 64 , false ) , ty ( 6 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedLocal ( Integer ( ?RESULT, 64, false), ty ( 6 ) , ?_ )) - ?_ - - - _ => ?_ - - (ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) - ) - - - requires // invariant of the `Integer` constructor - 0 <=Int A - andBool A i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_add(b) }; - unchecked_res -} diff --git a/scratch/unchecked_add/unchecked-add.smir.dot b/scratch/unchecked_add/unchecked-add.smir.dot deleted file mode 100644 index 079803cdd..000000000 --- a/scratch/unchecked_add/unchecked-add.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_add"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - subgraph cluster_0 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_1 [label="_0"]; - Xecf30c325a77cae0_0 [label="Call\l"]; - Xecf30c325a77cae0_1 [label="Return\l"]; - } - Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_0: _1 [label=""]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xf28f42e91011344a_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X4f9055e3140841d0_0 -> X4f9055e3140841d0_1 [label="_5"]; - X4f9055e3140841d0_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X4f9055e3140841d0_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X4f9055e3140841d0_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_3 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X3d323724ddeb8015_0 -> X3d323724ddeb8015_1 [label="_0"]; - X3d323724ddeb8015_0 [label="Call\l"]; - X3d323724ddeb8015_1 -> X3d323724ddeb8015_2 [label="_2"]; - X3d323724ddeb8015_1 [label="Call\l"]; - X3d323724ddeb8015_2 [label="Return\l"]; - } - X3d323724ddeb8015_0 -> Xecf30c325a77cae0_0 [label="_1,const :: ()"]; - X3d323724ddeb8015_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_4 { - label="main"; - style="filled"; - color=palegreen; - X899bfc87e7e82e90_0 -> X899bfc87e7e82e90_1 [label="_3"]; - X899bfc87e7e82e90_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - X899bfc87e7e82e90_1 -> X899bfc87e7e82e90_2; - X899bfc87e7e82e90_1 [label="_6 <- chkd-Add(_1, _2)\lAssert _6.1 == false\l"]; - X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_6 [label="0"]; - X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_3 [label="other"]; - X899bfc87e7e82e90_2 [label="_5 <- Use(_6.0)\l_4 <- Lt(_5, const :: i16)\lSwitchInt _4\l"]; - X899bfc87e7e82e90_3 -> X899bfc87e7e82e90_4; - X899bfc87e7e82e90_3 [label="_9 <- chkd-Add(_1, _2)\lAssert _9.1 == false\l"]; - X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_6 [label="0"]; - X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_5 [label="other"]; - X899bfc87e7e82e90_4 [label="_8 <- Use(_9.0)\l_7 <- Gt(_8, const :: i16)\lSwitchInt _7\l"]; - X899bfc87e7e82e90_5 [label="Return\l"]; - X899bfc87e7e82e90_6 [label="Call\l"]; - } - X899bfc87e7e82e90_0 -> X7464f1e6ba435b2a_0 [label="_1,_2"]; - X899bfc87e7e82e90_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_5 { - label="core::num::::unchecked_add::prec\nondition_check"; - style="filled"; - color=lightgray; - X3f7834dda050e10_0 -> X3f7834dda050e10_2 [label="0"]; - X3f7834dda050e10_0 -> X3f7834dda050e10_1 [label="other"]; - X3f7834dda050e10_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Add(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - X3f7834dda050e10_1 [label="Call\l"]; - X3f7834dda050e10_2 [label="Return\l"]; - } - X3f7834dda050e10_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_3 [label="Cleanup"]; - Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_1 [label="_0"]; - Xade51bc3a8f52008_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xade51bc3a8f52008_1 -> Xade51bc3a8f52008_2; - Xade51bc3a8f52008_1 [label="Drop _1\l"]; - Xade51bc3a8f52008_2 [label="Return\l"]; - Xade51bc3a8f52008_3 -> Xade51bc3a8f52008_4; - Xade51bc3a8f52008_3 [label="Drop _1\l"]; - Xade51bc3a8f52008_4 [label="Resume\l"]; - } - Xade51bc3a8f52008_0 -> X48be982d2a4cc59b_0 [label="_3,_2"]; - subgraph cluster_7 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X9c80f3743f4f0c10_0 -> X9c80f3743f4f0c10_1 [label="_0"]; - X9c80f3743f4f0c10_0 [label="Call\l"]; - X9c80f3743f4f0c10_1 [label="Return\l"]; - } - X9c80f3743f4f0c10_0 -> Xade51bc3a8f52008_0 [label="_1*,_2"]; - subgraph cluster_8 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X7464f1e6ba435b2a_0 -> X7464f1e6ba435b2a_1 [label="_0"]; - X7464f1e6ba435b2a_0 [label="Call\l"]; - X7464f1e6ba435b2a_1 [label="Return\l"]; - } - X7464f1e6ba435b2a_0 -> X354cc96a778c463_0 [label="_1,_2"]; - subgraph cluster_9 { - label="core::num::::unchecked_add"; - style="filled"; - color=lightgray; - X354cc96a778c463_0 -> X354cc96a778c463_2 [label="0"]; - X354cc96a778c463_0 -> X354cc96a778c463_1 [label="other"]; - X354cc96a778c463_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - X354cc96a778c463_1 -> X354cc96a778c463_2 [label="_4"]; - X354cc96a778c463_1 [label="Call\l"]; - X354cc96a778c463_2 [label="Storage Dead _3\l_0 <- AddUnchecked(_1, _2)\lReturn\l"]; - } - X354cc96a778c463_1 -> X3f7834dda050e10_0 [label="_1,_2"]; - subgraph cluster_10 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X5f7c0242b1a5f905_0 [label="Return\l"]; - } - subgraph cluster_11 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X48be982d2a4cc59b_0 -> X48be982d2a4cc59b_1 [label="_3"]; - X48be982d2a4cc59b_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X48be982d2a4cc59b_1 -> X48be982d2a4cc59b_2 [label="_2"]; - X48be982d2a4cc59b_1 [label="Storage Dead _4\lCall\l"]; - X48be982d2a4cc59b_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X48be982d2a4cc59b_0 -> X3d323724ddeb8015_0 [label="_4"]; - X48be982d2a4cc59b_1 -> Xf28f42e91011344a_0 [label="_3"]; -} diff --git a/scratch/unchecked_add/unchecked-add.smir.json b/scratch/unchecked_add/unchecked-add.smir.json deleted file mode 100644 index d98f99eae..000000000 --- a/scratch/unchecked_add/unchecked-add.smir.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"unchecked_add","crate_id":1100512358528492573,"allocs":[[2,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,97,100,100,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,43,32,98,32,60,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,43,32,98,32,62,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E"}],[35,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[32,{"NormalSym":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha7140c6faa1714efE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN13unchecked_add4main17hd8e1c5b7245124d4E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["AddUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_add/unchecked-op-spec.k b/scratch/unchecked_add/unchecked-op-spec.k deleted file mode 100644 index 278f9ef7c..000000000 --- a/scratch/unchecked_add/unchecked-op-spec.k +++ /dev/null @@ -1,76 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) - ) - - - requires // i16 invariants - 0 -Int (1 < i16::MAX) && (a * b < i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_mul(b) }; - unchecked_res -} diff --git a/scratch/unchecked_mul/unchecked-mul.smir.dot b/scratch/unchecked_mul/unchecked-mul.smir.dot deleted file mode 100644 index 1fd26d6eb..000000000 --- a/scratch/unchecked_mul/unchecked-mul.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_mul"; - node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X8f01db0e36395c71_0 -> X8f01db0e36395c71_1 [label="_0"]; - X8f01db0e36395c71_0 [label="Call\l"]; - X8f01db0e36395c71_1 [label="Return\l"]; - } - X8f01db0e36395c71_0 -> X8f01db0e36395c71_0: _1 [label=""]; - subgraph cluster_1 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X9e222efa6b726605_0 [label="Return\l"]; - } - subgraph cluster_2 { - label="core::num::::unchecked_mul"; - style="filled"; - color=lightgray; - Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_2 [label="0"]; - Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_1 [label="other"]; - Xeba6f5d5a379e29a_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xeba6f5d5a379e29a_1 -> Xeba6f5d5a379e29a_2 [label="_4"]; - Xeba6f5d5a379e29a_1 [label="Call\l"]; - Xeba6f5d5a379e29a_2 [label="Storage Dead _3\l_0 <- MulUnchecked(_1, _2)\lReturn\l"]; - } - Xeba6f5d5a379e29a_1 -> X9b97bece994ebb51_0 [label="_1,_2"]; - subgraph cluster_3 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X62f87ed0bcd6b426_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_4 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X69af4523a03742d5_0 -> X69af4523a03742d5_1 [label="_3"]; - X69af4523a03742d5_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X69af4523a03742d5_1 -> X69af4523a03742d5_2 [label="_2"]; - X69af4523a03742d5_1 [label="Storage Dead _4\lCall\l"]; - X69af4523a03742d5_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X69af4523a03742d5_0 -> Xcb8fb0027af607b6_0 [label="_4"]; - X69af4523a03742d5_1 -> X62f87ed0bcd6b426_0 [label="_3"]; - subgraph cluster_5 { - label="core::num::::unchecked_mul::prec\nondition_check"; - style="filled"; - color=lightgray; - X9b97bece994ebb51_0 -> X9b97bece994ebb51_2 [label="0"]; - X9b97bece994ebb51_0 -> X9b97bece994ebb51_1 [label="other"]; - X9b97bece994ebb51_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Mul(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - X9b97bece994ebb51_1 [label="Call\l"]; - X9b97bece994ebb51_2 [label="Return\l"]; - } - X9b97bece994ebb51_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X797ddd37b7ea3b5e_0 -> X797ddd37b7ea3b5e_1 [label="_5"]; - X797ddd37b7ea3b5e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X797ddd37b7ea3b5e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X797ddd37b7ea3b5e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_7 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - Xcb8fb0027af607b6_0 -> Xcb8fb0027af607b6_1 [label="_0"]; - Xcb8fb0027af607b6_0 [label="Call\l"]; - Xcb8fb0027af607b6_1 -> Xcb8fb0027af607b6_2 [label="_2"]; - Xcb8fb0027af607b6_1 [label="Call\l"]; - Xcb8fb0027af607b6_2 [label="Return\l"]; - } - Xcb8fb0027af607b6_0 -> X8f01db0e36395c71_0 [label="_1,const :: ()"]; - Xcb8fb0027af607b6_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_8 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X201617fc87c04742_0 -> X201617fc87c04742_1 [label="_0"]; - X201617fc87c04742_0 [label="Call\l"]; - X201617fc87c04742_1 [label="Return\l"]; - } - X201617fc87c04742_0 -> X86afcabc1ac42f91_0 [label="_1*,_2"]; - subgraph cluster_9 { - label="main"; - style="filled"; - color=palegreen; - Xe63d82c3b46f3acf_0 -> Xe63d82c3b46f3acf_1 [label="_3"]; - Xe63d82c3b46f3acf_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - Xe63d82c3b46f3acf_1 -> Xe63d82c3b46f3acf_2; - Xe63d82c3b46f3acf_1 [label="_6 <- chkd-Mul(_1, _2)\lAssert _6.1 == false\l"]; - Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_6 [label="0"]; - Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_3 [label="other"]; - Xe63d82c3b46f3acf_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; - Xe63d82c3b46f3acf_3 -> Xe63d82c3b46f3acf_4; - Xe63d82c3b46f3acf_3 [label="_9 <- chkd-Mul(_1, _2)\lAssert _9.1 == false\l"]; - Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_6 [label="0"]; - Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_5 [label="other"]; - Xe63d82c3b46f3acf_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; - Xe63d82c3b46f3acf_5 [label="Return\l"]; - Xe63d82c3b46f3acf_6 [label="Call\l"]; - } - Xe63d82c3b46f3acf_0 -> Xbe62f93610b866bf_0 [label="_1,_2"]; - Xe63d82c3b46f3acf_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_10 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_3 [label="Cleanup"]; - X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_1 [label="_0"]; - X86afcabc1ac42f91_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X86afcabc1ac42f91_1 -> X86afcabc1ac42f91_2; - X86afcabc1ac42f91_1 [label="Drop _1\l"]; - X86afcabc1ac42f91_2 [label="Return\l"]; - X86afcabc1ac42f91_3 -> X86afcabc1ac42f91_4; - X86afcabc1ac42f91_3 [label="Drop _1\l"]; - X86afcabc1ac42f91_4 [label="Resume\l"]; - } - X86afcabc1ac42f91_0 -> X69af4523a03742d5_0 [label="_3,_2"]; - subgraph cluster_11 { - label="unchecked_op"; - style="filled"; - color=palegreen; - Xbe62f93610b866bf_0 -> Xbe62f93610b866bf_1 [label="_0"]; - Xbe62f93610b866bf_0 [label="Call\l"]; - Xbe62f93610b866bf_1 [label="Return\l"]; - } - Xbe62f93610b866bf_0 -> Xeba6f5d5a379e29a_0 [label="_1,_2"]; -} diff --git a/scratch/unchecked_mul/unchecked-mul.smir.json b/scratch/unchecked_mul/unchecked-mul.smir.json deleted file mode 100644 index 2d32d0103..000000000 --- a/scratch/unchecked_mul/unchecked-mul.smir.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"unchecked_mul","crate_id":5290701492876642493,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,42,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,42,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,109,117,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E"}],[32,{"NormalSym":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE"}],[36,{"NoOpSym":""}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[20,{"IntrinsicSym":"black_box"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_mul4main17h0cc64cae78556d0bE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["MulUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hfdc6fe355496207dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null}],"types":[[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_mul/unchecked-op-spec.k b/scratch/unchecked_mul/unchecked-op-spec.k deleted file mode 100644 index 1ed739719..000000000 --- a/scratch/unchecked_mul/unchecked-op-spec.k +++ /dev/null @@ -1,74 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_neg() }; - unchecked_res -} diff --git a/scratch/unchecked_neg/unchecked-neg.smir.dot b/scratch/unchecked_neg/unchecked-neg.smir.dot deleted file mode 100644 index f0e5d18e2..000000000 --- a/scratch/unchecked_neg/unchecked-neg.smir.dot +++ /dev/null @@ -1,137 +0,0 @@ -digraph { - label="unchecked_neg"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8fc2060ad58510d8_0 [label="Intr: \ncold_path", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label="core::num::::unchecked_neg::prec\nondition_check"; - style="filled"; - color=lightgray; - X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_3 [label="0"]; - X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_1 [label="other"]; - X4dfedea7d15dfae0_0 [label="Storage Live _3\l_3 <- Eq(_1, const :: i16)\lSwitchInt _3\l"]; - X4dfedea7d15dfae0_1 -> X4dfedea7d15dfae0_2 [label="_4"]; - X4dfedea7d15dfae0_1 [label="Call\l"]; - X4dfedea7d15dfae0_2 [label="Storage Dead _3\lCall\l"]; - X4dfedea7d15dfae0_3 [label="Storage Dead _3\lReturn\l"]; - } - X4dfedea7d15dfae0_1 -> X8fc2060ad58510d8_0 [label=""]; - X4dfedea7d15dfae0_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_1 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xc472594511031ccd_0 [label="Return\l"]; - } - subgraph cluster_2 { - label="main"; - style="filled"; - color=palegreen; - X83ac00eefa6b73fd_0 -> X83ac00eefa6b73fd_1 [label="_1"]; - X83ac00eefa6b73fd_0 [label="_2 <- Use(const :: i16)\lCall\l"]; - X83ac00eefa6b73fd_1 [label="Return\l"]; - } - X83ac00eefa6b73fd_0 -> X25395281e54f77f2_0 [label="_2"]; - subgraph cluster_3 { - label="std::intrinsics::cold_pat\nh"; - style="filled"; - color=lightgray; - X3664cff3ef814fcc_0 [label="Return\l"]; - } - subgraph cluster_4 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X1e8170c41331abcf_0 -> X1e8170c41331abcf_1 [label="_3"]; - X1e8170c41331abcf_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X1e8170c41331abcf_1 -> X1e8170c41331abcf_2 [label="_2"]; - X1e8170c41331abcf_1 [label="Storage Dead _4\lCall\l"]; - X1e8170c41331abcf_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X1e8170c41331abcf_0 -> Xfd6302c9a18672af_0 [label="_4"]; - X1e8170c41331abcf_1 -> Xd2fa5dcfbfecedff_0 [label="_3"]; - subgraph cluster_5 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - Xfd6302c9a18672af_0 -> Xfd6302c9a18672af_1 [label="_0"]; - Xfd6302c9a18672af_0 [label="Call\l"]; - Xfd6302c9a18672af_1 -> Xfd6302c9a18672af_2 [label="_2"]; - Xfd6302c9a18672af_1 [label="Call\l"]; - Xfd6302c9a18672af_2 [label="Return\l"]; - } - Xfd6302c9a18672af_0 -> Xab2b2ee52cc1a3b6_0 [label="_1,const :: ()"]; - Xfd6302c9a18672af_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_6 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X25395281e54f77f2_0 -> X25395281e54f77f2_1 [label="_0"]; - X25395281e54f77f2_0 [label="Call\l"]; - X25395281e54f77f2_1 [label="Return\l"]; - } - X25395281e54f77f2_0 -> X36f7f4bce11fe0f_0 [label="_1"]; - subgraph cluster_7 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xd2fa5dcfbfecedff_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_8 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_1 [label="_0"]; - Xab2b2ee52cc1a3b6_0 [label="Call\l"]; - Xab2b2ee52cc1a3b6_1 [label="Return\l"]; - } - Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_0: _1 [label=""]; - subgraph cluster_9 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xa028f493aff12071_0 -> Xa028f493aff12071_1 [label="_0"]; - Xa028f493aff12071_0 [label="Call\l"]; - Xa028f493aff12071_1 [label="Return\l"]; - } - Xa028f493aff12071_0 -> X39f0dcc2beb3cbfc_0 [label="_1*,_2"]; - subgraph cluster_10 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_3 [label="Cleanup"]; - X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_1 [label="_0"]; - X39f0dcc2beb3cbfc_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X39f0dcc2beb3cbfc_1 -> X39f0dcc2beb3cbfc_2; - X39f0dcc2beb3cbfc_1 [label="Drop _1\l"]; - X39f0dcc2beb3cbfc_2 [label="Return\l"]; - X39f0dcc2beb3cbfc_3 -> X39f0dcc2beb3cbfc_4; - X39f0dcc2beb3cbfc_3 [label="Drop _1\l"]; - X39f0dcc2beb3cbfc_4 [label="Resume\l"]; - } - X39f0dcc2beb3cbfc_0 -> X1e8170c41331abcf_0 [label="_3,_2"]; - subgraph cluster_11 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X1752551397e242d3_0 -> X1752551397e242d3_1 [label="_5"]; - X1752551397e242d3_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X1752551397e242d3_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X1752551397e242d3_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_12 { - label="core::num::::unchecked_neg"; - style="filled"; - color=lightgray; - X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_2 [label="0"]; - X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_1 [label="other"]; - X36f7f4bce11fe0f_0 [label="Storage Live _2\l_2 <- UbChecks :: bool\lSwitchInt _2\l"]; - X36f7f4bce11fe0f_1 -> X36f7f4bce11fe0f_2 [label="_3"]; - X36f7f4bce11fe0f_1 [label="Call\l"]; - X36f7f4bce11fe0f_2 [label="Storage Dead _2\l_0 <- SubUnchecked(const :: i16, _1)\lReturn\l"]; - } - X36f7f4bce11fe0f_1 -> X4dfedea7d15dfae0_0 [label="_1"]; -} diff --git a/scratch/unchecked_neg/unchecked-neg.smir.json b/scratch/unchecked_neg/unchecked-neg.smir.json deleted file mode 100644 index ec557301f..000000000 --- a/scratch/unchecked_neg/unchecked-neg.smir.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"unchecked_neg","crate_id":8515610171801290459,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,110,101,103,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E"}],[32,{"NormalSym":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE"}],[24,{"IntrinsicSym":"cold_path"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":46},{"kind":{"Assign":[{"local":2,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":47}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":46}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":48,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":49}},{"statements":[{"kind":{"StorageDead":2},"span":51},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":7}}},{"Copy":{"local":1,"projection":[]}}]}]},"span":53}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":23,"span":54,"mutability":"Mut"},{"ty":23,"span":55,"mutability":"Not"},{"ty":21,"span":46,"mutability":"Mut"},{"ty":1,"span":49,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":55,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":56}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":14}}}}]},"span":75}],"terminator":{"kind":"Return","span":74}}],"locals":[{"ty":17,"span":76,"mutability":"Mut"},{"ty":1,"span":77,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":77,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":78}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg4main17h279e62d4b439df5fE","mono_item_kind":{"MonoItemFn":{"name":"main","id":9,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}}]},"span":82}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":15}}},"args":[{"Move":{"local":2,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":80}},{"statements":[],"terminator":{"kind":"Return","span":83}}],"locals":[{"ty":1,"span":84,"mutability":"Mut"},{"ty":23,"span":85,"mutability":"Not"},{"ty":23,"span":82,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":86,"scope":1},"composite":null,"value":{"Const":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}},"argument_index":null},{"name":"result","source_info":{"span":85,"scope":2},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":87}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":72}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":13}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":72}},{"statements":[],"terminator":{"kind":"Resume","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":12,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"},{"ty":31,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg::precondition_check","id":5,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":58},{"kind":{"Assign":[{"local":3,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":8}}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,3]],"otherwise":1}}},"span":57}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":9}}},"args":[],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":61}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":62,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":10}}},"args":[{"Constant":{"span":63,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}],"destination":{"local":2,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":64}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":1,"span":67,"mutability":"Mut"},{"ty":23,"span":68,"mutability":"Not"},{"ty":27,"span":64,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Mut"},{"ty":1,"span":61,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"lhs","source_info":{"span":68,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":69,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":70,"scope":2},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":71}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":12}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":29,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":1,"span":72,"mutability":"Mut"},{"ty":7,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":10,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":88,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":89}},{"statements":[],"terminator":{"kind":"Return","span":90}}],"locals":[{"ty":23,"span":91,"mutability":"Mut"},{"ty":23,"span":92,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"a","source_info":{"span":92,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"unchecked_res","source_info":{"span":93,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":94}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE","mono_item_kind":{"MonoItemFn":{"name":"std::intrinsics::cold_path","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":45}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":7,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":73}}],"locals":[{"ty":1,"span":73,"mutability":"Mut"},{"ty":29,"span":73,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":73}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[21,{"RigidTy":"Bool"}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_neg/unchecked-op-spec.k b/scratch/unchecked_neg/unchecked-op-spec.k deleted file mode 100644 index 38980561a..000000000 --- a/scratch/unchecked_neg/unchecked-op-spec.k +++ /dev/null @@ -1,72 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 79 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 15 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) - ) - - requires // i16 invariants - 0 -Int (1 < - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 71 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 13 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_shl(b) }; - unchecked_res -} diff --git a/scratch/unchecked_shl/unchecked-shl.smir.dot b/scratch/unchecked_shl/unchecked-shl.smir.dot deleted file mode 100644 index b621a4e00..000000000 --- a/scratch/unchecked_shl/unchecked-shl.smir.dot +++ /dev/null @@ -1,127 +0,0 @@ -digraph { - label="unchecked_shl"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - subgraph cluster_0 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X7ca0ff879d4d13eb_0 -> X7ca0ff879d4d13eb_1 [label="_0"]; - X7ca0ff879d4d13eb_0 [label="Call\l"]; - X7ca0ff879d4d13eb_1 [label="Return\l"]; - } - X7ca0ff879d4d13eb_0 -> Xf64250b1070257e5_0 [label="_1*,_2"]; - subgraph cluster_1 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_1 [label="_0"]; - Xca73baf8b721e82c_0 [label="Call\l"]; - Xca73baf8b721e82c_1 [label="Return\l"]; - } - Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_0: _1 [label=""]; - subgraph cluster_2 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X6985b604fd3ae6be_0 -> X6985b604fd3ae6be_1 [label="_0"]; - X6985b604fd3ae6be_0 [label="Call\l"]; - X6985b604fd3ae6be_1 [label="Return\l"]; - } - X6985b604fd3ae6be_0 -> Xe1c01b35d6c2026f_0 [label="_1,_2"]; - subgraph cluster_3 { - label="core::num::::unchecked_shl"; - style="filled"; - color=lightgray; - Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_2 [label="0"]; - Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_1 [label="other"]; - Xe1c01b35d6c2026f_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xe1c01b35d6c2026f_1 -> Xe1c01b35d6c2026f_2 [label="_4"]; - Xe1c01b35d6c2026f_1 [label="Call\l"]; - Xe1c01b35d6c2026f_2 [label="Storage Dead _3\l_0 <- ShlUnchecked(_1, _2)\lReturn\l"]; - } - Xe1c01b35d6c2026f_1 -> X739610367822bd9b_0 [label="_2"]; - subgraph cluster_4 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xf64250b1070257e5_0 -> Xf64250b1070257e5_3 [label="Cleanup"]; - Xf64250b1070257e5_0 -> Xf64250b1070257e5_1 [label="_0"]; - Xf64250b1070257e5_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xf64250b1070257e5_1 -> Xf64250b1070257e5_2; - Xf64250b1070257e5_1 [label="Drop _1\l"]; - Xf64250b1070257e5_2 [label="Return\l"]; - Xf64250b1070257e5_3 -> Xf64250b1070257e5_4; - Xf64250b1070257e5_3 [label="Drop _1\l"]; - Xf64250b1070257e5_4 [label="Resume\l"]; - } - Xf64250b1070257e5_0 -> X8c1d75f364744448_0 [label="_3,_2"]; - subgraph cluster_5 { - label="core::num::::unchecked_shl::prec\nondition_check"; - style="filled"; - color=lightgray; - X739610367822bd9b_0 -> X739610367822bd9b_2 [label="0"]; - X739610367822bd9b_0 -> X739610367822bd9b_1 [label="other"]; - X739610367822bd9b_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; - X739610367822bd9b_1 [label="Storage Dead _2\lReturn\l"]; - X739610367822bd9b_2 [label="Call\l"]; - } - X739610367822bd9b_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X8c1d75f364744448_0 -> X8c1d75f364744448_1 [label="_3"]; - X8c1d75f364744448_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X8c1d75f364744448_1 -> X8c1d75f364744448_2 [label="_2"]; - X8c1d75f364744448_1 [label="Storage Dead _4\lCall\l"]; - X8c1d75f364744448_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X8c1d75f364744448_0 -> X92deb757c4463693_0 [label="_4"]; - X8c1d75f364744448_1 -> X9e057dae70d0b216_0 [label="_3"]; - subgraph cluster_7 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xebd6923e157bf244_0 [label="Return\l"]; - } - subgraph cluster_8 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - Xd9564944a8357ebc_0 -> Xd9564944a8357ebc_1 [label="_5"]; - Xd9564944a8357ebc_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - Xd9564944a8357ebc_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - Xd9564944a8357ebc_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_9 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X92deb757c4463693_0 -> X92deb757c4463693_1 [label="_0"]; - X92deb757c4463693_0 [label="Call\l"]; - X92deb757c4463693_1 -> X92deb757c4463693_2 [label="_2"]; - X92deb757c4463693_1 [label="Call\l"]; - X92deb757c4463693_2 [label="Return\l"]; - } - X92deb757c4463693_0 -> Xca73baf8b721e82c_0 [label="_1,const :: ()"]; - X92deb757c4463693_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_10 { - label="main"; - style="filled"; - color=palegreen; - Xb244b26227a3c207_0 -> Xb244b26227a3c207_1 [label="_1"]; - Xb244b26227a3c207_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; - Xb244b26227a3c207_1 [label="Return\l"]; - } - Xb244b26227a3c207_0 -> X6985b604fd3ae6be_0 [label="_2,_3"]; - subgraph cluster_11 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X9e057dae70d0b216_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } -} diff --git a/scratch/unchecked_shl/unchecked-shl.smir.json b/scratch/unchecked_shl/unchecked-shl.smir.json deleted file mode 100644 index 8dae9a816..000000000 --- a/scratch/unchecked_shl/unchecked-shl.smir.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"unchecked_shl","crate_id":2438242285894030786,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E"}],[32,{"NormalSym":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h4b70c8118c54af25E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl4main17h99915c6a84d89e82E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShlUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_shr/unchecked-op-spec.k b/scratch/unchecked_shr/unchecked-op-spec.k deleted file mode 100644 index a4ca1cc58..000000000 --- a/scratch/unchecked_shr/unchecked-op-spec.k +++ /dev/null @@ -1,74 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 71 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 13 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_shr(b) }; - unchecked_res -} diff --git a/scratch/unchecked_shr/unchecked-shr.smir.dot b/scratch/unchecked_shr/unchecked-shr.smir.dot deleted file mode 100644 index 4bfe94015..000000000 --- a/scratch/unchecked_shr/unchecked-shr.smir.dot +++ /dev/null @@ -1,127 +0,0 @@ -digraph { - label="unchecked_shr"; - node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - subgraph cluster_0 { - label="core::num::::unchecked_shr"; - style="filled"; - color=lightgray; - X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_2 [label="0"]; - X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_1 [label="other"]; - X3dfb10421593b1e8_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - X3dfb10421593b1e8_1 -> X3dfb10421593b1e8_2 [label="_4"]; - X3dfb10421593b1e8_1 [label="Call\l"]; - X3dfb10421593b1e8_2 [label="Storage Dead _3\l_0 <- ShrUnchecked(_1, _2)\lReturn\l"]; - } - X3dfb10421593b1e8_1 -> X67406d0b881e84da_0 [label="_2"]; - subgraph cluster_1 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X1fcbbfbc6742d998_0 -> X1fcbbfbc6742d998_1 [label="_5"]; - X1fcbbfbc6742d998_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X1fcbbfbc6742d998_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X1fcbbfbc6742d998_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_2 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X2ea79ec23c0f6969_0 -> X2ea79ec23c0f6969_1 [label="_0"]; - X2ea79ec23c0f6969_0 [label="Call\l"]; - X2ea79ec23c0f6969_1 [label="Return\l"]; - } - X2ea79ec23c0f6969_0 -> X3dfb10421593b1e8_0 [label="_1,_2"]; - subgraph cluster_3 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X308478c52589b452_0 -> X308478c52589b452_1 [label="_0"]; - X308478c52589b452_0 [label="Call\l"]; - X308478c52589b452_1 [label="Return\l"]; - } - X308478c52589b452_0 -> X308478c52589b452_0: _1 [label=""]; - subgraph cluster_4 { - label="main"; - style="filled"; - color=palegreen; - X74e505ee082dcd3c_0 -> X74e505ee082dcd3c_1 [label="_1"]; - X74e505ee082dcd3c_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; - X74e505ee082dcd3c_1 [label="Return\l"]; - } - X74e505ee082dcd3c_0 -> X2ea79ec23c0f6969_0 [label="_2,_3"]; - subgraph cluster_5 { - label="core::num::::unchecked_shr::prec\nondition_check"; - style="filled"; - color=lightgray; - X67406d0b881e84da_0 -> X67406d0b881e84da_2 [label="0"]; - X67406d0b881e84da_0 -> X67406d0b881e84da_1 [label="other"]; - X67406d0b881e84da_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; - X67406d0b881e84da_1 [label="Storage Dead _2\lReturn\l"]; - X67406d0b881e84da_2 [label="Call\l"]; - } - X67406d0b881e84da_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X63a912d85dcf5dbc_0 -> X63a912d85dcf5dbc_1 [label="_0"]; - X63a912d85dcf5dbc_0 [label="Call\l"]; - X63a912d85dcf5dbc_1 [label="Return\l"]; - } - X63a912d85dcf5dbc_0 -> Xc86fbb6bb8f835bf_0 [label="_1*,_2"]; - subgraph cluster_7 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X8f6613fb2e5e284f_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_8 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - Xc5c68a464c01d1d6_0 -> Xc5c68a464c01d1d6_1 [label="_3"]; - Xc5c68a464c01d1d6_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - Xc5c68a464c01d1d6_1 -> Xc5c68a464c01d1d6_2 [label="_2"]; - Xc5c68a464c01d1d6_1 [label="Storage Dead _4\lCall\l"]; - Xc5c68a464c01d1d6_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - Xc5c68a464c01d1d6_0 -> X418d756885456e9e_0 [label="_4"]; - Xc5c68a464c01d1d6_1 -> X8f6613fb2e5e284f_0 [label="_3"]; - subgraph cluster_9 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xa8d344f9e18404f4_0 [label="Return\l"]; - } - subgraph cluster_10 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X418d756885456e9e_0 -> X418d756885456e9e_1 [label="_0"]; - X418d756885456e9e_0 [label="Call\l"]; - X418d756885456e9e_1 -> X418d756885456e9e_2 [label="_2"]; - X418d756885456e9e_1 [label="Call\l"]; - X418d756885456e9e_2 [label="Return\l"]; - } - X418d756885456e9e_0 -> X308478c52589b452_0 [label="_1,const :: ()"]; - X418d756885456e9e_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_11 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_3 [label="Cleanup"]; - Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_1 [label="_0"]; - Xc86fbb6bb8f835bf_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xc86fbb6bb8f835bf_1 -> Xc86fbb6bb8f835bf_2; - Xc86fbb6bb8f835bf_1 [label="Drop _1\l"]; - Xc86fbb6bb8f835bf_2 [label="Return\l"]; - Xc86fbb6bb8f835bf_3 -> Xc86fbb6bb8f835bf_4; - Xc86fbb6bb8f835bf_3 [label="Drop _1\l"]; - Xc86fbb6bb8f835bf_4 [label="Resume\l"]; - } - Xc86fbb6bb8f835bf_0 -> Xc5c68a464c01d1d6_0 [label="_3,_2"]; -} diff --git a/scratch/unchecked_shr/unchecked-shr.smir.json b/scratch/unchecked_shr/unchecked-shr.smir.json deleted file mode 100644 index dba54586c..000000000 --- a/scratch/unchecked_shr/unchecked-shr.smir.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"unchecked_shr","crate_id":11374706484823853070,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,114,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E"}],[20,{"IntrinsicSym":"black_box"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E"}],[32,{"NormalSym":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hd2b815e8bd96d253E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShrUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file diff --git a/scratch/unchecked_sub/unchecked-op-spec.k b/scratch/unchecked_sub/unchecked-op-spec.k deleted file mode 100644 index b3a9316f8..000000000 --- a/scratch/unchecked_sub/unchecked-op-spec.k +++ /dev/null @@ -1,74 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) - ) - - requires // i16 invariants - 0 -Int (1 < i16::MAX) && (a - b < i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_sub(b) }; - unchecked_res -} diff --git a/scratch/unchecked_sub/unchecked-sub.smir.dot b/scratch/unchecked_sub/unchecked-sub.smir.dot deleted file mode 100644 index 7dd70579e..000000000 --- a/scratch/unchecked_sub/unchecked-sub.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_sub"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X6ed7f5222f8fff3d_0 -> X6ed7f5222f8fff3d_1 [label="_0"]; - X6ed7f5222f8fff3d_0 [label="Call\l"]; - X6ed7f5222f8fff3d_1 -> X6ed7f5222f8fff3d_2 [label="_2"]; - X6ed7f5222f8fff3d_1 [label="Call\l"]; - X6ed7f5222f8fff3d_2 [label="Return\l"]; - } - X6ed7f5222f8fff3d_0 -> X2c1ab9ccb2ee2902_0 [label="_1,const :: ()"]; - X6ed7f5222f8fff3d_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xb356150a39730498_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="core::num::::unchecked_sub"; - style="filled"; - color=lightgray; - Xe89ce436dda28930_0 -> Xe89ce436dda28930_2 [label="0"]; - Xe89ce436dda28930_0 -> Xe89ce436dda28930_1 [label="other"]; - Xe89ce436dda28930_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xe89ce436dda28930_1 -> Xe89ce436dda28930_2 [label="_4"]; - Xe89ce436dda28930_1 [label="Call\l"]; - Xe89ce436dda28930_2 [label="Storage Dead _3\l_0 <- SubUnchecked(_1, _2)\lReturn\l"]; - } - Xe89ce436dda28930_1 -> Xd6d8542b139753eb_0 [label="_1,_2"]; - subgraph cluster_3 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X4d9411a803faadfe_0 -> X4d9411a803faadfe_3 [label="Cleanup"]; - X4d9411a803faadfe_0 -> X4d9411a803faadfe_1 [label="_0"]; - X4d9411a803faadfe_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X4d9411a803faadfe_1 -> X4d9411a803faadfe_2; - X4d9411a803faadfe_1 [label="Drop _1\l"]; - X4d9411a803faadfe_2 [label="Return\l"]; - X4d9411a803faadfe_3 -> X4d9411a803faadfe_4; - X4d9411a803faadfe_3 [label="Drop _1\l"]; - X4d9411a803faadfe_4 [label="Resume\l"]; - } - X4d9411a803faadfe_0 -> X396121085053712_0 [label="_3,_2"]; - subgraph cluster_4 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_1 [label="_0"]; - X2c1ab9ccb2ee2902_0 [label="Call\l"]; - X2c1ab9ccb2ee2902_1 [label="Return\l"]; - } - X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_0: _1 [label=""]; - subgraph cluster_5 { - label="main"; - style="filled"; - color=palegreen; - X4f441ab82149a815_0 -> X4f441ab82149a815_1 [label="_3"]; - X4f441ab82149a815_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - X4f441ab82149a815_1 -> X4f441ab82149a815_2; - X4f441ab82149a815_1 [label="_6 <- chkd-Sub(_1, _2)\lAssert _6.1 == false\l"]; - X4f441ab82149a815_2 -> X4f441ab82149a815_6 [label="0"]; - X4f441ab82149a815_2 -> X4f441ab82149a815_3 [label="other"]; - X4f441ab82149a815_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; - X4f441ab82149a815_3 -> X4f441ab82149a815_4; - X4f441ab82149a815_3 [label="_9 <- chkd-Sub(_1, _2)\lAssert _9.1 == false\l"]; - X4f441ab82149a815_4 -> X4f441ab82149a815_6 [label="0"]; - X4f441ab82149a815_4 -> X4f441ab82149a815_5 [label="other"]; - X4f441ab82149a815_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; - X4f441ab82149a815_5 [label="Return\l"]; - X4f441ab82149a815_6 [label="Call\l"]; - } - X4f441ab82149a815_0 -> X949dd9980f2a3388_0 [label="_1,_2"]; - X4f441ab82149a815_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_6 { - label="core::num::::unchecked_sub::prec\nondition_check"; - style="filled"; - color=lightgray; - Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_2 [label="0"]; - Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_1 [label="other"]; - Xd6d8542b139753eb_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Sub(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - Xd6d8542b139753eb_1 [label="Call\l"]; - Xd6d8542b139753eb_2 [label="Return\l"]; - } - Xd6d8542b139753eb_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_7 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X396121085053712_0 -> X396121085053712_1 [label="_3"]; - X396121085053712_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X396121085053712_1 -> X396121085053712_2 [label="_2"]; - X396121085053712_1 [label="Storage Dead _4\lCall\l"]; - X396121085053712_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X396121085053712_0 -> X6ed7f5222f8fff3d_0 [label="_4"]; - X396121085053712_1 -> Xb356150a39730498_0 [label="_3"]; - subgraph cluster_8 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X3d6480ec228be4ec_0 -> X3d6480ec228be4ec_1 [label="_5"]; - X3d6480ec228be4ec_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X3d6480ec228be4ec_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X3d6480ec228be4ec_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_9 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X949dd9980f2a3388_0 -> X949dd9980f2a3388_1 [label="_0"]; - X949dd9980f2a3388_0 [label="Call\l"]; - X949dd9980f2a3388_1 [label="Return\l"]; - } - X949dd9980f2a3388_0 -> Xe89ce436dda28930_0 [label="_1,_2"]; - subgraph cluster_10 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X7cb88635fb24da5a_0 [label="Return\l"]; - } - subgraph cluster_11 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X41331acabe05b18d_0 -> X41331acabe05b18d_1 [label="_0"]; - X41331acabe05b18d_0 [label="Call\l"]; - X41331acabe05b18d_1 [label="Return\l"]; - } - X41331acabe05b18d_0 -> X4d9411a803faadfe_0 [label="_1*,_2"]; -} diff --git a/scratch/unchecked_sub/unchecked-sub.smir.json b/scratch/unchecked_sub/unchecked-sub.smir.json deleted file mode 100644 index ae8aeea5f..000000000 --- a/scratch/unchecked_sub/unchecked-sub.smir.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"unchecked_sub","crate_id":17961444647620661476,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,45,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,45,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,117,98,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[20,{"IntrinsicSym":"black_box"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E"}],[32,{"NormalSym":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub4main17h289393681834f0fcE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h233dfbd9029fc4f7E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null}],"types":[[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[9,{"RigidTy":{"Uint":"U8"}}]],"debug":null} \ No newline at end of file From 5f4ffeb4ea91520688301bd62559a3135eed2fd3 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 20:13:21 -0300 Subject: [PATCH 09/84] Update README.md Creating README. --- rust-verification-proofs/README.md | 68 +++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md index 4123ec020..dcc981797 100644 --- a/rust-verification-proofs/README.md +++ b/rust-verification-proofs/README.md @@ -1 +1,67 @@ -Init text \ No newline at end of file +# Formal Rust Code Verification Using KMIR + +This subrepository contains a collection of programs and specifications that aim to illustrate how KMIR can be used to validate the properties of Rust programs and the Rust language itself. The code made available in this repository was developed taking as references the challenges present on the [Verify Rust Std Library Effort](https://model-checking.github.io/verify-rust-std/intro.html). + +## Table of Contents + + +- [Project Setup](#project-setup) +- [Proof 1: Proving a Maximum Finding Function That only Uses `lower-than (<)`](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) +- [Proof 2: Proving Unsafe Arithmetic Operations](#project-2-project-two-name) + +## Project Setup + +In order to run and explore the proofs elaborated here, make sure that KMIR can be locally executed in your machine following the instructions available in [this repository's README file](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs). + +([Be sure to have Rust installed](https://www.rust-lang.org/tools/install)) in your machine, have the specific components and toolchain necessary to run KMIR. To guarantee it, with `rustup` installed, run the following commands: + +```bash +rustup component add rust-src rustc-dev llvm-tools-preview +rustup toolchain install nightly-2024-11-29 +rustup default nightly-2024-11-29 +``` + +**(Optional)** Additionally, if you would like to build your own code specifications to be proven with KMIR, install the [Rust Stable MIR Pretty Printing](https://github.com/runtimeverification/stable-mir-json/tree/20820cc6abd8fd22769931a3f8754ee35ab24c05) tool. It won't be necessary to install it if you'd like to understand how KMIR works and to execute its proofs, but it is needed currently to help us traverse program states, as seen in the [steps needed to achieve Proof 1's specification](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). To install the Rust Stable MIR Pretty Printing tool, in the root of this project, run: + +```bash +git submodule update --init --recursive +make stable-mir-json +``` + +The usage of this tool will be abstracted in the future, removing the need to construct claims manually. + +## Proof 1: Proving a Maximum Finding Function That only Uses `lower-than` + +Considering a function that receives three integer arguments, this function should return the highest value among them. Assertions can be used to enforce this condition, and an example code that tests this function can be seen below: + +```Rust +fn main() { + + let a:usize = 42; + let b:usize = -43; + let c:usize = 0; + + let result = maximum(a, b, c); + + assert!(result >= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: usize, b: usize, c: usize) -> usize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} +``` + +Notice in this case that `a`, `b`, and `c` are concrete, fixed values. To turn the parameters of `maximum` into symbolic variables, we can obtain the representation of the function call to `maximum` executed using KMIR and then replace the concrete values of these variables with symbolic values. Furthermore, the assertion specified in the code can be implemented as a requirement which should be met by the symbolic variables, meaning that any value that they can assume must respect the conditions contained in the specification. Following this approach, we can utilize KMIR to give us a formal proof that, for any valid `isize` input, the maximum value among the three parameters will be returned. + +Information on how the specification was created can be found in the [here](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). + +To run this proof in your terminal from this folder, execute: + +```Bash +cd maximum-proof +poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof +``` + From 7a546e9a29c3ae67010d2bf0ad359b0596bd4c39 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 20:28:12 -0300 Subject: [PATCH 10/84] Update README.md Adding section for unsafe arithmetics --- rust-verification-proofs/README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md index dcc981797..8d91b64a4 100644 --- a/rust-verification-proofs/README.md +++ b/rust-verification-proofs/README.md @@ -7,7 +7,7 @@ This subrepository contains a collection of programs and specifications that aim - [Project Setup](#project-setup) - [Proof 1: Proving a Maximum Finding Function That only Uses `lower-than (<)`](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) -- [Proof 2: Proving Unsafe Arithmetic Operations](#project-2-project-two-name) +- [Proof 2: Proving Unsafe Arithmetic Operations](#proof-2-proving-unsafe-arithmetic-operations) ## Project Setup @@ -65,3 +65,24 @@ cd maximum-proof poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof ``` +## Proof 2: Proving Unsafe Arithmetic Operations + +The proofs in this section concern a section of the challenge of securing [Safety of Methods for Numeric Primitive Types](https://model-checking.github.io/verify-rust-std/challenges/0011-floats-ints.html#challenge-11-safety-of-methods-for-numeric-primitive-types) of the Verify Rust Std Library Effort. Here, we implement proof of concepts of how KMIR can be used to prove the following unsafe methods according to their undefined behaviors: `unchecked_add`, `unchecked_sub`, `unchecked_mul`, `unchecked_shl`, `unchecked_shr`, and `unchecked_neg`. + +For these functions, the proofs were carried out using variables of the `i16` integer type, and the undefined behaviors for these functions were obtained in the [i16 type documentation page](https://doc.rust-lang.org/std/primitive.i16.html). + +To obtain the specifications that prove the absence/absence of arithmetic overflow/underflow and undefined behavior for these functions, analogous processes to the ones discussed in [Proof 1](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) were performed. + +To run the proofs for these functions, run the commands below replacing `$METHOD_NAME` with the desired unsafe method name: + +```Bash +cd $METHOD_NAME +poetry -C ../../kmir/ run -- kmir prove run $PWD/unchecked-op-spec.k --proof-dir $PWD/proof +``` + + + + + + + From 592b2768331b856b52a7073058a2eed1cdf3fed2 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 20:31:36 -0300 Subject: [PATCH 11/84] Removing repo from command --- rust-verification-proofs/maximum-proof/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust-verification-proofs/maximum-proof/README.md b/rust-verification-proofs/maximum-proof/README.md index ea565f7bf..425e9b7b4 100644 --- a/rust-verification-proofs/maximum-proof/README.md +++ b/rust-verification-proofs/maximum-proof/README.md @@ -36,12 +36,12 @@ In a future version, we will be able to start directly with the `maximum` functi Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. ```shell -maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs ``` The Stable MIR for the program can also be rendered as a graph, using the `--dot` option. This creates `main-max-with-lt.smir.dot`. ```shell -maximum-proof$ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs ``` ## Constructing the claim by executing `main` to certain points @@ -86,11 +86,11 @@ Alternatively, it is possible to construct a claim that the entire rest of the p ## Running the prover on the claim and viewing the proof ```shell -maximum-proof$ poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof +poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof ``` The proof steps are saved in the `$PWD/proof` directory for later inspection using `kmir prove view`. This is especially important when the proof does _not_ succeed immediately. ```shell -maximum-proof$ poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof +poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof ``` From 570a63e9d21ce15bf23c52a08b51f01dbae9f514 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 20:34:55 -0300 Subject: [PATCH 12/84] FIx wording --- rust-verification-proofs/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md index 8d91b64a4..fd5f7456e 100644 --- a/rust-verification-proofs/README.md +++ b/rust-verification-proofs/README.md @@ -1,6 +1,6 @@ # Formal Rust Code Verification Using KMIR -This subrepository contains a collection of programs and specifications that aim to illustrate how KMIR can be used to validate the properties of Rust programs and the Rust language itself. The code made available in this repository was developed taking as references the challenges present on the [Verify Rust Std Library Effort](https://model-checking.github.io/verify-rust-std/intro.html). +This subrepository contains a collection of programs and specifications that aim to illustrate how KMIR can be used to validate the properties of Rust programs and the Rust language itself. The code made available in this repository was developed taking as references the challenges present on the [Verify Rust Standard Library Effort](https://model-checking.github.io/verify-rust-std/intro.html). ## Table of Contents @@ -54,7 +54,7 @@ fn maximum(a: usize, b: usize, c: usize) -> usize { } ``` -Notice in this case that `a`, `b`, and `c` are concrete, fixed values. To turn the parameters of `maximum` into symbolic variables, we can obtain the representation of the function call to `maximum` executed using KMIR and then replace the concrete values of these variables with symbolic values. Furthermore, the assertion specified in the code can be implemented as a requirement which should be met by the symbolic variables, meaning that any value that they can assume must respect the conditions contained in the specification. Following this approach, we can utilize KMIR to give us a formal proof that, for any valid `isize` input, the maximum value among the three parameters will be returned. +Notice in this case that `a`, `b`, and `c` are concrete, fixed values. To turn the parameters of `maximum` into symbolic variables, we can obtain the representation of the function call to `maximum` executed using KMIR and then replace the concrete values of these variables with symbolic values. Furthermore, the assertion specified in the code can be manually translated as a requirement that should be met by the symbolic variables, meaning that any value that they can assume must respect the conditions contained in the specification. Following this approach, we can utilize KMIR to give us formal proof that, for any valid `isize` input, the maximum value among the three parameters will be returned. Information on how the specification was created can be found in the [here](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). @@ -67,13 +67,13 @@ poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PW ## Proof 2: Proving Unsafe Arithmetic Operations -The proofs in this section concern a section of the challenge of securing [Safety of Methods for Numeric Primitive Types](https://model-checking.github.io/verify-rust-std/challenges/0011-floats-ints.html#challenge-11-safety-of-methods-for-numeric-primitive-types) of the Verify Rust Std Library Effort. Here, we implement proof of concepts of how KMIR can be used to prove the following unsafe methods according to their undefined behaviors: `unchecked_add`, `unchecked_sub`, `unchecked_mul`, `unchecked_shl`, `unchecked_shr`, and `unchecked_neg`. +The proofs in this section concern a section of the challenge of securing [Safety of Methods for Numeric Primitive Types](https://model-checking.github.io/verify-rust-std/challenges/0011-floats-ints.html#challenge-11-safety-of-methods-for-numeric-primitive-types) of the Verify Rust Standard Library Effort. Here, we implement proof of concepts of how KMIR can be used to prove the following unsafe methods according to their undefined behaviors: `unchecked_add`, `unchecked_sub`, `unchecked_mul`, `unchecked_shl`, `unchecked_shr`, and `unchecked_neg`. -For these functions, the proofs were carried out using variables of the `i16` integer type, and the undefined behaviors for these functions were obtained in the [i16 type documentation page](https://doc.rust-lang.org/std/primitive.i16.html). +For these functions, the proofs were carried out using variables of the `i16` integer type, and the criteria for triggering undefined behaviors for these methods were obtained in the [i16 type documentation page](https://doc.rust-lang.org/std/primitive.i16.html). -To obtain the specifications that prove the absence/absence of arithmetic overflow/underflow and undefined behavior for these functions, analogous processes to the ones discussed in [Proof 1](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) were performed. +To obtain the specifications that prove the presence/absence of undefined behavior for these functions, analogous processes to the ones discussed in [Proof 1](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) were performed. -To run the proofs for these functions, run the commands below replacing `$METHOD_NAME` with the desired unsafe method name: +To run the proofs for these functions, run the commands below, replacing `$METHOD_NAME` with the desired unsafe method name: ```Bash cd $METHOD_NAME From d421709705c25becce691faa94ef7a1afb5aa8e9 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Fri, 21 Mar 2025 21:03:54 -0300 Subject: [PATCH 13/84] Update README.md --- rust-verification-proofs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md index fd5f7456e..09a65ac8c 100644 --- a/rust-verification-proofs/README.md +++ b/rust-verification-proofs/README.md @@ -13,7 +13,7 @@ This subrepository contains a collection of programs and specifications that aim In order to run and explore the proofs elaborated here, make sure that KMIR can be locally executed in your machine following the instructions available in [this repository's README file](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs). -([Be sure to have Rust installed](https://www.rust-lang.org/tools/install)) in your machine, have the specific components and toolchain necessary to run KMIR. To guarantee it, with `rustup` installed, run the following commands: +[Be sure to have Rust installed](https://www.rust-lang.org/tools/install) in your machine, have the specific components and toolchain necessary to run KMIR. To guarantee it, with `rustup` installed, run the following commands: ```bash rustup component add rust-src rustc-dev llvm-tools-preview From e2de329d009cde25f505819d7c8c9815571db9e7 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Sat, 22 Mar 2025 18:02:13 -0300 Subject: [PATCH 14/84] Fix operation names and requires condition --- rust-verification-proofs/unchecked_add/unchecked-op-spec.k | 3 +-- rust-verification-proofs/unchecked_mul/unchecked-op-spec.k | 5 ++--- rust-verification-proofs/unchecked_neg/unchecked-op-spec.k | 3 +-- rust-verification-proofs/unchecked_shl/unchecked-op-spec.k | 5 ++--- rust-verification-proofs/unchecked_shr/unchecked-op-spec.k | 5 ++--- rust-verification-proofs/unchecked_sub/unchecked-op-spec.k | 3 +-- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k index 1a4409143..5f234168d 100644 --- a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k +++ b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k @@ -69,8 +69,7 @@ module UNCHECKED-OP-SPEC andBool 0 -Int (1 < Date: Sat, 22 Mar 2025 19:06:27 -0300 Subject: [PATCH 15/84] Update README.md --- rust-verification-proofs/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md index 09a65ac8c..59118277f 100644 --- a/rust-verification-proofs/README.md +++ b/rust-verification-proofs/README.md @@ -73,6 +73,18 @@ For these functions, the proofs were carried out using variables of the `i16` in To obtain the specifications that prove the presence/absence of undefined behavior for these functions, analogous processes to the ones discussed in [Proof 1](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) were performed. +For an illustration of how we specify the requirements of the proof, which, in this case, are the assertions that would help us detect the presence/absence of undefined behavior in the unsafe methods, let's explore how we can prove safety conditions for the `unchecked_add` operation. Consider the following function: + +https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-add.rs#L11-L14 + +`unchecked_op` is a function that receives two `i16` arguments and executes an `unchecked_add` of the first parameter by the second, returning an `i16` value resulting from this operation. According to the [documentation of the unchecked_add function for the i16 primitive type](https://doc.rust-lang.org/std/primitive.i16.html#method.unchecked_add), considering the safety of this function "This results in undefined behavior when `self + rhs > i16::MAX or self + rhs < i16::MIN`, i.e. when `checked_add` would return `None`". By the process further disclosed in Proof 1, we can obtain a valid representation of a function call for `unchecked_op` and modify the variable values to be symbolic. The next step is to define the conditions these values should meet to verify safety conditions elaborated for `unchecked_add`. To this goal, see the following code snippet: + +https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-op-spec.k#L66-L73 + +The parameters for `unchecked_add` in this specification for KMIR are represented as A and B, which now are symbolic values. To specify the goal of our verification process, we implemented the above code snippet into the specification, which adds a requirement to the execution of our symbolic execution engine. In other words, our proof will only be successful if the specified requirements above are respected. + +In this `requires` clause, first, we use the semantics of K to specify A and B's boundaries, as `i16`s: `0 -Int (1 < Date: Mon, 24 Mar 2025 13:49:15 +1000 Subject: [PATCH 16/84] Some edits and updates to the proof (#503) Jost corrected an error with `isize` and `usize`. And I changed some of the copy in the README. Also updates the branch to current master --------- Co-authored-by: Jost Berthold Co-authored-by: devops Co-authored-by: rv-jenkins --- LICENSE | 28 + Makefile | 2 +- README.md | 4 +- deps/k_release | 2 +- deps/stable-mir-json | 2 +- flake.lock | 16 +- flake.nix | 2 +- kmir/poetry.lock | 211 +- kmir/pyproject.toml | 7 +- kmir/src/kmir/__init__.py | 2 +- kmir/src/kmir/__main__.py | 2 +- .../kmir/convert_from_definition/parser.py | 154 - kmir/src/kmir/convert_json/__init__.py | 0 kmir/src/kmir/convert_json/__main__.py | 14 - kmir/src/kmir/convert_json/convert.py | 648 ---- kmir/src/kmir/kdist/mir-semantics/kmir.md | 16 +- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 282 +- .../__main__.py | 2 +- .../notes.md | 0 .../v2parser.py => parse/parser.py} | 0 .../data/exec-smir/references/doubleRef.rs | 10 + .../exec-smir/references/doubleRef.smir.json | 2695 ++++++++++++++ .../data/exec-smir/references/doubleRef.state | 76 + .../exec-smir/references/escapingScope.rs | 17 + .../data/exec-smir/references/mutableRef.rs | 17 + .../exec-smir/references/mutableRef.smir.json | 2128 +++++++++++ .../exec-smir/references/mutableRef.state | 69 + .../data/exec-smir/references/refAsArg.rs | 11 + .../exec-smir/references/refAsArg.smir.json | 1888 ++++++++++ .../data/exec-smir/references/refAsArg.state | 64 + .../data/exec-smir/references/refAsArg2.rs | 16 + .../exec-smir/references/refAsArg2.smir.json | 1984 ++++++++++ .../data/exec-smir/references/refAsArg2.state | 65 + .../data/exec-smir/references/refReturned.rs | 16 + .../references/refReturned.smir.json | 2023 +++++++++++ .../exec-smir/references/refReturned.state | 66 + .../data/exec-smir/references/simple.rs | 7 + .../exec-smir/references/simple.smir.json | 1805 ++++++++++ .../data/exec-smir/references/simple.state | 62 + .../data/exec-smir/references/weirdRefs.rs | 43 + .../exec-smir/references/weirdRefs.smir.json | 3196 +++++++++++++++++ .../data/exec-smir/references/weirdRefs.state | 94 + .../src/tests/integration/test_integration.py | 46 +- package/version | 2 +- .../maximum-proof/README.md | 10 +- .../maximum-proof/main-max-with-lt.rs | 8 +- .../maximum-proof/main-max-with-lt.smir.dot | 178 +- .../maximum-proof/main-max-with-lt.smir.json | 2697 +++++++++++++- .../maximum-proof/maximum-spec.k | 11 +- 49 files changed, 19620 insertions(+), 1078 deletions(-) create mode 100644 LICENSE delete mode 100644 kmir/src/kmir/convert_from_definition/parser.py delete mode 100644 kmir/src/kmir/convert_json/__init__.py delete mode 100644 kmir/src/kmir/convert_json/__main__.py delete mode 100644 kmir/src/kmir/convert_json/convert.py rename kmir/src/kmir/{convert_from_definition => parse}/__main__.py (95%) rename kmir/src/kmir/{convert_from_definition => parse}/notes.md (100%) rename kmir/src/kmir/{convert_from_definition/v2parser.py => parse/parser.py} (100%) create mode 100644 kmir/src/tests/integration/data/exec-smir/references/doubleRef.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/references/doubleRef.state create mode 100644 kmir/src/tests/integration/data/exec-smir/references/escapingScope.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/mutableRef.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/references/mutableRef.state create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refAsArg.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refAsArg.state create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refAsArg2.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refReturned.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/references/refReturned.state create mode 100644 kmir/src/tests/integration/data/exec-smir/references/simple.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/simple.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/references/simple.state create mode 100644 kmir/src/tests/integration/data/exec-smir/references/weirdRefs.rs create mode 100644 kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json create mode 100644 kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..88de609be --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2023 - 2025, Runtime Verification Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Makefile b/Makefile index f1e65742c..12374d9d6 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ smir-parse-tests: # build # commented out for CI's sake && echo -n "smir-ed " \ || report "$$source" "SMIR ERROR!"; \ if [ -s $${target} ]; then \ - ${POETRY_RUN} convert-from-definition $$(realpath $${target}) Pgm > /dev/null \ + ${POETRY_RUN} parse $$(realpath $${target}) Pgm > /dev/null \ && (echo "and parsed!"; rm $${target}) \ || report "$$source" "PARSE ERROR!"; \ fi; \ diff --git a/README.md b/README.md index 9faf63c12..03dcfcd4c 100644 --- a/README.md +++ b/README.md @@ -24,13 +24,15 @@ Use `make` to run common tasks (see the [Makefile](Makefile) for a complete list * `make build`: Build wheel -For interactive use, spawn a shell with `poetry -C kmir/ shell` (after `poetry -C kmir/ install`), then run an interpreter. +For interactive use, spawn a shell with `poetry -C kmir/ shell` (after `poetry -C kmir/ install`), then run an interpreter. Or directly run from `mir-semantics` root with `poetry run -C kmir kmir ` ## Usage Use `--help` with each command for more details. +`parse` to parse a Stable MIR JSON file (`*.smir.json`) file to a K AST + `kmir run` to load an SMIR json generated by the `stable-mir-json` tool. `kmir gen-spec` to take an SMIR json and create a K specification module that ensures termination of the program. diff --git a/deps/k_release b/deps/k_release index 15e8ca413..60a95a903 100644 --- a/deps/k_release +++ b/deps/k_release @@ -1 +1 @@ -7.1.218 +7.1.229 diff --git a/deps/stable-mir-json b/deps/stable-mir-json index 20820cc6a..fbdfe361d 160000 --- a/deps/stable-mir-json +++ b/deps/stable-mir-json @@ -1 +1 @@ -Subproject commit 20820cc6abd8fd22769931a3f8754ee35ab24c05 +Subproject commit fbdfe361d79a7d125d4ff70fb7c7b354eee483ee diff --git a/flake.lock b/flake.lock index 61735ad2f..feeb714fd 100644 --- a/flake.lock +++ b/flake.lock @@ -120,16 +120,16 @@ ] }, "locked": { - "lastModified": 1741166879, - "narHash": "sha256-kbhoAh/s/XJCQwDZZPaF2vk3fzJdSSTw7jHf22BJ2AI=", + "lastModified": 1742323592, + "narHash": "sha256-NQg0XqVYS/LSLL5MAoEFG4h1MeiDh1DA4kHxO1Hi0yk=", "owner": "runtimeverification", "repo": "k", - "rev": "37f442b90e04d00e90a9cc250c70ff043d0f80d7", + "rev": "2d74ec8ea9c6d91df65641e4ca757d87de9dc502", "type": "github" }, "original": { "owner": "runtimeverification", - "ref": "v7.1.218", + "ref": "v7.1.229", "repo": "k", "type": "github" } @@ -151,16 +151,16 @@ "utils": "utils" }, "locked": { - "lastModified": 1739992196, - "narHash": "sha256-VquQtJCkhBvXnuwPAXadcS0nvR8AdzNDOhDdc6mNFuE=", + "lastModified": 1741724052, + "narHash": "sha256-OAdqbdbcjnUkiyHVQ7ejF8eft+vaCQJwcJjjUNDMFGU=", "owner": "runtimeverification", "repo": "llvm-backend", - "rev": "4203a45110504a6661ca086816e28dafa9e7ac54", + "rev": "b5ede02dd2b3ad5ff4c7244eb10b52d5607950c6", "type": "github" }, "original": { "owner": "runtimeverification", - "ref": "v0.1.126", + "ref": "v0.1.128", "repo": "llvm-backend", "type": "github" } diff --git a/flake.nix b/flake.nix index b09bb8ebe..72623f89b 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "mir-semantics - "; inputs = { - k-framework.url = "github:runtimeverification/k/v7.1.218"; + k-framework.url = "github:runtimeverification/k/v7.1.229"; nixpkgs.follows = "k-framework/nixpkgs"; flake-utils.follows = "k-framework/flake-utils"; rv-utils.follows = "k-framework/rv-utils"; diff --git a/kmir/poetry.lock b/kmir/poetry.lock index cbc05d6ed..a1cb13dbd 100644 --- a/kmir/poetry.lock +++ b/kmir/poetry.lock @@ -22,21 +22,21 @@ test = ["dateparser (>=1.0.0,<2.0.0)", "pre-commit", "pytest", "pytest-cov", "py [[package]] name = "attrs" -version = "25.1.0" +version = "25.3.0" description = "Classes Without Boilerplate" category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "attrs-25.1.0-py3-none-any.whl", hash = "sha256:c75a69e28a550a7e93789579c22aa26b0f5b83b75dc4e08fe092980051e1090a"}, - {file = "attrs-25.1.0.tar.gz", hash = "sha256:1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e"}, + {file = "attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3"}, + {file = "attrs-25.3.0.tar.gz", hash = "sha256:75d7cefc7fb576747b2c81b4442d4d4a1ce0900973527c011d1030fd3bf4af1b"}, ] [package.extras] benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] +docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] @@ -343,75 +343,75 @@ rich = "*" [[package]] name = "coverage" -version = "7.6.12" +version = "7.7.1" description = "Code coverage measurement for Python" category = "dev" optional = false python-versions = ">=3.9" files = [ - {file = "coverage-7.6.12-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:704c8c8c6ce6569286ae9622e534b4f5b9759b6f2cd643f1c1a61f666d534fe8"}, - {file = "coverage-7.6.12-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ad7525bf0241e5502168ae9c643a2f6c219fa0a283001cee4cf23a9b7da75879"}, - {file = "coverage-7.6.12-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06097c7abfa611c91edb9e6920264e5be1d6ceb374efb4986f38b09eed4cb2fe"}, - {file = "coverage-7.6.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:220fa6c0ad7d9caef57f2c8771918324563ef0d8272c94974717c3909664e674"}, - {file = "coverage-7.6.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3688b99604a24492bcfe1c106278c45586eb819bf66a654d8a9a1433022fb2eb"}, - {file = "coverage-7.6.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d1a987778b9c71da2fc8948e6f2656da6ef68f59298b7e9786849634c35d2c3c"}, - {file = "coverage-7.6.12-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:cec6b9ce3bd2b7853d4a4563801292bfee40b030c05a3d29555fd2a8ee9bd68c"}, - {file = "coverage-7.6.12-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ace9048de91293e467b44bce0f0381345078389814ff6e18dbac8fdbf896360e"}, - {file = "coverage-7.6.12-cp310-cp310-win32.whl", hash = "sha256:ea31689f05043d520113e0552f039603c4dd71fa4c287b64cb3606140c66f425"}, - {file = "coverage-7.6.12-cp310-cp310-win_amd64.whl", hash = "sha256:676f92141e3c5492d2a1596d52287d0d963df21bf5e55c8b03075a60e1ddf8aa"}, - {file = "coverage-7.6.12-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e18aafdfb3e9ec0d261c942d35bd7c28d031c5855dadb491d2723ba54f4c3015"}, - {file = "coverage-7.6.12-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:66fe626fd7aa5982cdebad23e49e78ef7dbb3e3c2a5960a2b53632f1f703ea45"}, - {file = "coverage-7.6.12-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ef01d70198431719af0b1f5dcbefc557d44a190e749004042927b2a3fed0702"}, - {file = "coverage-7.6.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e92ae5a289a4bc4c0aae710c0948d3c7892e20fd3588224ebe242039573bf0"}, - {file = "coverage-7.6.12-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e695df2c58ce526eeab11a2e915448d3eb76f75dffe338ea613c1201b33bab2f"}, - {file = "coverage-7.6.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d74c08e9aaef995f8c4ef6d202dbd219c318450fe2a76da624f2ebb9c8ec5d9f"}, - {file = "coverage-7.6.12-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e995b3b76ccedc27fe4f477b349b7d64597e53a43fc2961db9d3fbace085d69d"}, - {file = "coverage-7.6.12-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b1f097878d74fe51e1ddd1be62d8e3682748875b461232cf4b52ddc6e6db0bba"}, - {file = "coverage-7.6.12-cp311-cp311-win32.whl", hash = "sha256:1f7ffa05da41754e20512202c866d0ebfc440bba3b0ed15133070e20bf5aeb5f"}, - {file = "coverage-7.6.12-cp311-cp311-win_amd64.whl", hash = "sha256:e216c5c45f89ef8971373fd1c5d8d1164b81f7f5f06bbf23c37e7908d19e8558"}, - {file = "coverage-7.6.12-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b172f8e030e8ef247b3104902cc671e20df80163b60a203653150d2fc204d1ad"}, - {file = "coverage-7.6.12-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:641dfe0ab73deb7069fb972d4d9725bf11c239c309ce694dd50b1473c0f641c3"}, - {file = "coverage-7.6.12-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e549f54ac5f301e8e04c569dfdb907f7be71b06b88b5063ce9d6953d2d58574"}, - {file = "coverage-7.6.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:959244a17184515f8c52dcb65fb662808767c0bd233c1d8a166e7cf74c9ea985"}, - {file = "coverage-7.6.12-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bda1c5f347550c359f841d6614fb8ca42ae5cb0b74d39f8a1e204815ebe25750"}, - {file = "coverage-7.6.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1ceeb90c3eda1f2d8c4c578c14167dbd8c674ecd7d38e45647543f19839dd6ea"}, - {file = "coverage-7.6.12-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:0f16f44025c06792e0fb09571ae454bcc7a3ec75eeb3c36b025eccf501b1a4c3"}, - {file = "coverage-7.6.12-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b076e625396e787448d27a411aefff867db2bffac8ed04e8f7056b07024eed5a"}, - {file = "coverage-7.6.12-cp312-cp312-win32.whl", hash = "sha256:00b2086892cf06c7c2d74983c9595dc511acca00665480b3ddff749ec4fb2a95"}, - {file = "coverage-7.6.12-cp312-cp312-win_amd64.whl", hash = "sha256:7ae6eabf519bc7871ce117fb18bf14e0e343eeb96c377667e3e5dd12095e0288"}, - {file = "coverage-7.6.12-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:488c27b3db0ebee97a830e6b5a3ea930c4a6e2c07f27a5e67e1b3532e76b9ef1"}, - {file = "coverage-7.6.12-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d1095bbee1851269f79fd8e0c9b5544e4c00c0c24965e66d8cba2eb5bb535fd"}, - {file = "coverage-7.6.12-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0533adc29adf6a69c1baa88c3d7dbcaadcffa21afbed3ca7a225a440e4744bf9"}, - {file = "coverage-7.6.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53c56358d470fa507a2b6e67a68fd002364d23c83741dbc4c2e0680d80ca227e"}, - {file = "coverage-7.6.12-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64cbb1a3027c79ca6310bf101014614f6e6e18c226474606cf725238cf5bc2d4"}, - {file = "coverage-7.6.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:79cac3390bfa9836bb795be377395f28410811c9066bc4eefd8015258a7578c6"}, - {file = "coverage-7.6.12-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9b148068e881faa26d878ff63e79650e208e95cf1c22bd3f77c3ca7b1d9821a3"}, - {file = "coverage-7.6.12-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8bec2ac5da793c2685ce5319ca9bcf4eee683b8a1679051f8e6ec04c4f2fd7dc"}, - {file = "coverage-7.6.12-cp313-cp313-win32.whl", hash = "sha256:200e10beb6ddd7c3ded322a4186313d5ca9e63e33d8fab4faa67ef46d3460af3"}, - {file = "coverage-7.6.12-cp313-cp313-win_amd64.whl", hash = "sha256:2b996819ced9f7dbb812c701485d58f261bef08f9b85304d41219b1496b591ef"}, - {file = "coverage-7.6.12-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:299cf973a7abff87a30609879c10df0b3bfc33d021e1adabc29138a48888841e"}, - {file = "coverage-7.6.12-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4b467a8c56974bf06e543e69ad803c6865249d7a5ccf6980457ed2bc50312703"}, - {file = "coverage-7.6.12-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2458f275944db8129f95d91aee32c828a408481ecde3b30af31d552c2ce284a0"}, - {file = "coverage-7.6.12-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a9d8be07fb0832636a0f72b80d2a652fe665e80e720301fb22b191c3434d924"}, - {file = "coverage-7.6.12-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14d47376a4f445e9743f6c83291e60adb1b127607a3618e3185bbc8091f0467b"}, - {file = "coverage-7.6.12-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b95574d06aa9d2bd6e5cc35a5bbe35696342c96760b69dc4287dbd5abd4ad51d"}, - {file = "coverage-7.6.12-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:ecea0c38c9079570163d663c0433a9af4094a60aafdca491c6a3d248c7432827"}, - {file = "coverage-7.6.12-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2251fabcfee0a55a8578a9d29cecfee5f2de02f11530e7d5c5a05859aa85aee9"}, - {file = "coverage-7.6.12-cp313-cp313t-win32.whl", hash = "sha256:eb5507795caabd9b2ae3f1adc95f67b1104971c22c624bb354232d65c4fc90b3"}, - {file = "coverage-7.6.12-cp313-cp313t-win_amd64.whl", hash = "sha256:f60a297c3987c6c02ffb29effc70eadcbb412fe76947d394a1091a3615948e2f"}, - {file = "coverage-7.6.12-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e7575ab65ca8399c8c4f9a7d61bbd2d204c8b8e447aab9d355682205c9dd948d"}, - {file = "coverage-7.6.12-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8161d9fbc7e9fe2326de89cd0abb9f3599bccc1287db0aba285cb68d204ce929"}, - {file = "coverage-7.6.12-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a1e465f398c713f1b212400b4e79a09829cd42aebd360362cd89c5bdc44eb87"}, - {file = "coverage-7.6.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f25d8b92a4e31ff1bd873654ec367ae811b3a943583e05432ea29264782dc32c"}, - {file = "coverage-7.6.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a936309a65cc5ca80fa9f20a442ff9e2d06927ec9a4f54bcba9c14c066323f2"}, - {file = "coverage-7.6.12-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:aa6f302a3a0b5f240ee201297fff0bbfe2fa0d415a94aeb257d8b461032389bd"}, - {file = "coverage-7.6.12-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:f973643ef532d4f9be71dd88cf7588936685fdb576d93a79fe9f65bc337d9d73"}, - {file = "coverage-7.6.12-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:78f5243bb6b1060aed6213d5107744c19f9571ec76d54c99cc15938eb69e0e86"}, - {file = "coverage-7.6.12-cp39-cp39-win32.whl", hash = "sha256:69e62c5034291c845fc4df7f8155e8544178b6c774f97a99e2734b05eb5bed31"}, - {file = "coverage-7.6.12-cp39-cp39-win_amd64.whl", hash = "sha256:b01a840ecc25dce235ae4c1b6a0daefb2a203dba0e6e980637ee9c2f6ee0df57"}, - {file = "coverage-7.6.12-pp39.pp310-none-any.whl", hash = "sha256:7e39e845c4d764208e7b8f6a21c541ade741e2c41afabdfa1caa28687a3c98cf"}, - {file = "coverage-7.6.12-py3-none-any.whl", hash = "sha256:eb8668cfbc279a536c633137deeb9435d2962caec279c3f8cf8b91fff6ff8953"}, - {file = "coverage-7.6.12.tar.gz", hash = "sha256:48cfc4641d95d34766ad41d9573cc0f22a48aa88d22657a1fe01dca0dbae4de2"}, + {file = "coverage-7.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:553ba93f8e3c70e1b0031e4dfea36aba4e2b51fe5770db35e99af8dc5c5a9dfe"}, + {file = "coverage-7.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:44683f2556a56c9a6e673b583763096b8efbd2df022b02995609cf8e64fc8ae0"}, + {file = "coverage-7.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02fad4f8faa4153db76f9246bc95c1d99f054f4e0a884175bff9155cf4f856cb"}, + {file = "coverage-7.7.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c181ceba2e6808ede1e964f7bdc77bd8c7eb62f202c63a48cc541e5ffffccb6"}, + {file = "coverage-7.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80b5b207a8b08c6a934b214e364cab2fa82663d4af18981a6c0a9e95f8df7602"}, + {file = "coverage-7.7.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:25fe40967717bad0ce628a0223f08a10d54c9d739e88c9cbb0f77b5959367542"}, + {file = "coverage-7.7.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:881cae0f9cbd928c9c001487bb3dcbfd0b0af3ef53ae92180878591053be0cb3"}, + {file = "coverage-7.7.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c90e9141e9221dd6fbc16a2727a5703c19443a8d9bf7d634c792fa0287cee1ab"}, + {file = "coverage-7.7.1-cp310-cp310-win32.whl", hash = "sha256:ae13ed5bf5542d7d4a0a42ff5160e07e84adc44eda65ddaa635c484ff8e55917"}, + {file = "coverage-7.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:171e9977c6a5d2b2be9efc7df1126fd525ce7cad0eb9904fe692da007ba90d81"}, + {file = "coverage-7.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1165490be0069e34e4f99d08e9c5209c463de11b471709dfae31e2a98cbd49fd"}, + {file = "coverage-7.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:44af11c00fd3b19b8809487630f8a0039130d32363239dfd15238e6d37e41a48"}, + {file = "coverage-7.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbba59022e7c20124d2f520842b75904c7b9f16c854233fa46575c69949fb5b9"}, + {file = "coverage-7.7.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af94fb80e4f159f4d93fb411800448ad87b6039b0500849a403b73a0d36bb5ae"}, + {file = "coverage-7.7.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eae79f8e3501133aa0e220bbc29573910d096795882a70e6f6e6637b09522133"}, + {file = "coverage-7.7.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e33426a5e1dc7743dd54dfd11d3a6c02c5d127abfaa2edd80a6e352b58347d1a"}, + {file = "coverage-7.7.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b559adc22486937786731dac69e57296cb9aede7e2687dfc0d2696dbd3b1eb6b"}, + {file = "coverage-7.7.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b838a91e84e1773c3436f6cc6996e000ed3ca5721799e7789be18830fad009a2"}, + {file = "coverage-7.7.1-cp311-cp311-win32.whl", hash = "sha256:2c492401bdb3a85824669d6a03f57b3dfadef0941b8541f035f83bbfc39d4282"}, + {file = "coverage-7.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:1e6f867379fd033a0eeabb1be0cffa2bd660582b8b0c9478895c509d875a9d9e"}, + {file = "coverage-7.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:eff187177d8016ff6addf789dcc421c3db0d014e4946c1cc3fbf697f7852459d"}, + {file = "coverage-7.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2444fbe1ba1889e0b29eb4d11931afa88f92dc507b7248f45be372775b3cef4f"}, + {file = "coverage-7.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:177d837339883c541f8524683e227adcaea581eca6bb33823a2a1fdae4c988e1"}, + {file = "coverage-7.7.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:15d54ecef1582b1d3ec6049b20d3c1a07d5e7f85335d8a3b617c9960b4f807e0"}, + {file = "coverage-7.7.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75c82b27c56478d5e1391f2e7b2e7f588d093157fa40d53fd9453a471b1191f2"}, + {file = "coverage-7.7.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:315ff74b585110ac3b7ab631e89e769d294f303c6d21302a816b3554ed4c81af"}, + {file = "coverage-7.7.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4dd532dac197d68c478480edde74fd4476c6823355987fd31d01ad9aa1e5fb59"}, + {file = "coverage-7.7.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:385618003e3d608001676bb35dc67ae3ad44c75c0395d8de5780af7bb35be6b2"}, + {file = "coverage-7.7.1-cp312-cp312-win32.whl", hash = "sha256:63306486fcb5a827449464f6211d2991f01dfa2965976018c9bab9d5e45a35c8"}, + {file = "coverage-7.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:37351dc8123c154fa05b7579fdb126b9f8b1cf42fd6f79ddf19121b7bdd4aa04"}, + {file = "coverage-7.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:eebd927b86761a7068a06d3699fd6c20129becf15bb44282db085921ea0f1585"}, + {file = "coverage-7.7.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2a79c4a09765d18311c35975ad2eb1ac613c0401afdd9cb1ca4110aeb5dd3c4c"}, + {file = "coverage-7.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b1c65a739447c5ddce5b96c0a388fd82e4bbdff7251396a70182b1d83631019"}, + {file = "coverage-7.7.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:392cc8fd2b1b010ca36840735e2a526fcbd76795a5d44006065e79868cc76ccf"}, + {file = "coverage-7.7.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9bb47cc9f07a59a451361a850cb06d20633e77a9118d05fd0f77b1864439461b"}, + {file = "coverage-7.7.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b4c144c129343416a49378e05c9451c34aae5ccf00221e4fa4f487db0816ee2f"}, + {file = "coverage-7.7.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:bc96441c9d9ca12a790b5ae17d2fa6654da4b3962ea15e0eabb1b1caed094777"}, + {file = "coverage-7.7.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:3d03287eb03186256999539d98818c425c33546ab4901028c8fa933b62c35c3a"}, + {file = "coverage-7.7.1-cp313-cp313-win32.whl", hash = "sha256:8fed429c26b99641dc1f3a79179860122b22745dd9af36f29b141e178925070a"}, + {file = "coverage-7.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:092b134129a8bb940c08b2d9ceb4459af5fb3faea77888af63182e17d89e1cf1"}, + {file = "coverage-7.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3154b369141c3169b8133973ac00f63fcf8d6dbcc297d788d36afbb7811e511"}, + {file = "coverage-7.7.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:264ff2bcce27a7f455b64ac0dfe097680b65d9a1a293ef902675fa8158d20b24"}, + {file = "coverage-7.7.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba8480ebe401c2f094d10a8c4209b800a9b77215b6c796d16b6ecdf665048950"}, + {file = "coverage-7.7.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:520af84febb6bb54453e7fbb730afa58c7178fd018c398a8fcd8e269a79bf96d"}, + {file = "coverage-7.7.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88d96127ae01ff571d465d4b0be25c123789cef88ba0879194d673fdea52f54e"}, + {file = "coverage-7.7.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:0ce92c5a9d7007d838456f4b77ea159cb628187a137e1895331e530973dcf862"}, + {file = "coverage-7.7.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:0dab4ef76d7b14f432057fdb7a0477e8bffca0ad39ace308be6e74864e632271"}, + {file = "coverage-7.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:7e688010581dbac9cab72800e9076e16f7cccd0d89af5785b70daa11174e94de"}, + {file = "coverage-7.7.1-cp313-cp313t-win32.whl", hash = "sha256:e52eb31ae3afacdacfe50705a15b75ded67935770c460d88c215a9c0c40d0e9c"}, + {file = "coverage-7.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:a6b6b3bd121ee2ec4bd35039319f3423d0be282b9752a5ae9f18724bc93ebe7c"}, + {file = "coverage-7.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:34a3bf6b92e6621fc4dcdaab353e173ccb0ca9e4bfbcf7e49a0134c86c9cd303"}, + {file = "coverage-7.7.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d6874929d624d3a670f676efafbbc747f519a6121b581dd41d012109e70a5ebd"}, + {file = "coverage-7.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ba5ff236c87a7b7aa1441a216caf44baee14cbfbd2256d306f926d16b026578"}, + {file = "coverage-7.7.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:452735fafe8ff5918236d5fe1feac322b359e57692269c75151f9b4ee4b7e1bc"}, + {file = "coverage-7.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5f99a93cecf799738e211f9746dc83749b5693538fbfac279a61682ba309387"}, + {file = "coverage-7.7.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:11dd6f52c2a7ce8bf0a5f3b6e4a8eb60e157ffedc3c4b4314a41c1dfbd26ce58"}, + {file = "coverage-7.7.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:b52edb940d087e2a96e73c1523284a2e94a4e66fa2ea1e2e64dddc67173bad94"}, + {file = "coverage-7.7.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d2e73e2ac468536197e6b3ab79bc4a5c9da0f078cd78cfcc7fe27cf5d1195ef0"}, + {file = "coverage-7.7.1-cp39-cp39-win32.whl", hash = "sha256:18f544356bceef17cc55fcf859e5664f06946c1b68efcea6acdc50f8f6a6e776"}, + {file = "coverage-7.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:d66ff48ab3bb6f762a153e29c0fc1eb5a62a260217bc64470d7ba602f5886d20"}, + {file = "coverage-7.7.1-pp39.pp310.pp311-none-any.whl", hash = "sha256:5b7b02e50d54be6114cc4f6a3222fec83164f7c42772ba03b520138859b5fde1"}, + {file = "coverage-7.7.1-py3-none-any.whl", hash = "sha256:822fa99dd1ac686061e1219b67868e25d9757989cf2259f735a4802497d6da31"}, + {file = "coverage-7.7.1.tar.gz", hash = "sha256:199a1272e642266b90c9f40dec7fd3d307b51bf639fa0d15980dc0b3246c1393"}, ] [package.dependencies] @@ -452,14 +452,14 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "filelock" -version = "3.17.0" +version = "3.18.0" description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.9" files = [ - {file = "filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338"}, - {file = "filelock-3.17.0.tar.gz", hash = "sha256:ee4e77401ef576ebb38cd7f13b9b28893194acc20a8e68e18730ba9c0e54660e"}, + {file = "filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de"}, + {file = "filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2"}, ] [package.extras] @@ -623,14 +623,14 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve [[package]] name = "hypothesis" -version = "6.127.8" +version = "6.130.2" description = "A library for property-based testing" category = "main" optional = false python-versions = ">=3.9" files = [ - {file = "hypothesis-6.127.8-py3-none-any.whl", hash = "sha256:f8614a586b933ca87fa6be0bf1d673f5718d027e3281bbaff6967f0f2cba7c09"}, - {file = "hypothesis-6.127.8.tar.gz", hash = "sha256:2df4cfb131b30bf85d785892137b7d39b978aea7cfbe319a574dc13071b7ee4b"}, + {file = "hypothesis-6.130.2-py3-none-any.whl", hash = "sha256:b4c03a4a34466e76ecba518390e1759294607d44744e7e122477371b12deb03f"}, + {file = "hypothesis-6.130.2.tar.gz", hash = "sha256:979195ef58c309aab98d74b64bbcda5411d0bc86848c1bf89dbffb78c7c7e3ee"}, ] [package.dependencies] @@ -639,10 +639,10 @@ exceptiongroup = {version = ">=1.0.0", markers = "python_version < \"3.11\""} sortedcontainers = ">=2.1.0,<3.0.0" [package.extras] -all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.82)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.20)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2025.1)", "watchdog (>=4.0.0)"] +all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.83)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.20)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2025.1)", "watchdog (>=4.0.0)"] cli = ["black (>=19.10b0)", "click (>=7.0)", "rich (>=9.0.0)"] codemods = ["libcst (>=0.3.16)"] -crosshair = ["crosshair-tool (>=0.0.82)", "hypothesis-crosshair (>=0.0.20)"] +crosshair = ["crosshair-tool (>=0.0.83)", "hypothesis-crosshair (>=0.0.20)"] dateutil = ["python-dateutil (>=1.4)"] django = ["django (>=4.2)"] dpcontracts = ["dpcontracts (>=0.4)"] @@ -697,14 +697,14 @@ type = ["pytest-mypy"] [[package]] name = "iniconfig" -version = "2.0.0" +version = "2.1.0" description = "brain-dead simple config-ini parsing" category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, - {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, + {file = "iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760"}, + {file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"}, ] [[package]] @@ -743,14 +743,14 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "kframework" -version = "7.1.218" +version = "7.1.229" description = "" category = "main" optional = false python-versions = "<4.0,>=3.10" files = [ - {file = "kframework-7.1.218-py3-none-any.whl", hash = "sha256:948429480d14bf4ca8b2945805d830a403345c97fbafef58d6c917c4afade514"}, - {file = "kframework-7.1.218.tar.gz", hash = "sha256:35e420b022d9cbd379dff6db86610a660d11780eb7f586fd0bf677e1f33e5210"}, + {file = "kframework-7.1.229-py3-none-any.whl", hash = "sha256:c96a425a4c2e3a2a27ca6443dc870426c86134e1893e7a0cc68ba127962d7470"}, + {file = "kframework-7.1.229.tar.gz", hash = "sha256:e5490eba79eb6547f54b324a776631fd265fa7dba55fec533058cb4bd377be15"}, ] [package.dependencies] @@ -760,6 +760,7 @@ cookiecutter = ">=2.6.0,<3.0.0" filelock = ">=3.9.0,<4.0.0" graphviz = ">=0.20.1,<0.21.0" hypothesis = ">=6.103.1,<7.0.0" +networkx = ">=3.4.2,<4.0.0" psutil = ">=5.9.5,<6.0.0" pybind11 = ">=2.10.3,<3.0.0" pytest = "*" @@ -996,6 +997,26 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] +[[package]] +name = "networkx" +version = "3.4.2" +description = "Python package for creating and manipulating graphs and networks" +category = "main" +optional = false +python-versions = ">=3.10" +files = [ + {file = "networkx-3.4.2-py3-none-any.whl", hash = "sha256:df5d4365b724cf81b8c6a7312509d0c22386097011ad1abe274afd5e9d3bbc5f"}, + {file = "networkx-3.4.2.tar.gz", hash = "sha256:307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1"}, +] + +[package.extras] +default = ["matplotlib (>=3.7)", "numpy (>=1.24)", "pandas (>=2.0)", "scipy (>=1.10,!=1.11.0,!=1.11.1)"] +developer = ["changelist (==0.5)", "mypy (>=1.1)", "pre-commit (>=3.2)", "rtoml"] +doc = ["intersphinx-registry", "myst-nb (>=1.1)", "numpydoc (>=1.8.0)", "pillow (>=9.4)", "pydata-sphinx-theme (>=0.15)", "sphinx (>=7.3)", "sphinx-gallery (>=0.16)", "texext (>=0.6.7)"] +example = ["cairocffi (>=1.7)", "contextily (>=1.6)", "igraph (>=0.11)", "momepy (>=0.7.2)", "osmnx (>=1.9)", "scikit-learn (>=1.5)", "seaborn (>=0.13)"] +extra = ["lxml (>=4.6)", "pydot (>=3.0.1)", "pygraphviz (>=1.14)", "sympy (>=1.10)"] +test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] + [[package]] name = "packaging" version = "24.2" @@ -1037,20 +1058,20 @@ flake8 = ">=5.0.0" [[package]] name = "platformdirs" -version = "4.3.6" +version = "4.3.7" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." category = "dev" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb"}, - {file = "platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"}, + {file = "platformdirs-4.3.7-py3-none-any.whl", hash = "sha256:a03875334331946f13c549dbd8f4bac7a13a50a895a0eb1e8c6a8ace80d40a94"}, + {file = "platformdirs-4.3.7.tar.gz", hash = "sha256:eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.2)", "pytest-cov (>=5)", "pytest-mock (>=3.14)"] -type = ["mypy (>=1.11.2)"] +docs = ["furo (>=2024.8.6)", "proselint (>=0.14)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=8.3.4)", "pytest-cov (>=6)", "pytest-mock (>=3.14)"] +type = ["mypy (>=1.14.1)"] [[package]] name = "pluggy" @@ -1413,19 +1434,19 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "setuptools" -version = "75.8.2" +version = "77.0.3" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "dev" optional = false python-versions = ">=3.9" files = [ - {file = "setuptools-75.8.2-py3-none-any.whl", hash = "sha256:558e47c15f1811c1fa7adbd0096669bf76c1d3f433f58324df69f3f5ecac4e8f"}, - {file = "setuptools-75.8.2.tar.gz", hash = "sha256:4880473a969e5f23f2a2be3646b2dfd84af9028716d398e46192f84bc36900d2"}, + {file = "setuptools-77.0.3-py3-none-any.whl", hash = "sha256:67122e78221da5cf550ddd04cf8742c8fe12094483749a792d56cd669d6cf58c"}, + {file = "setuptools-77.0.3.tar.gz", hash = "sha256:583b361c8da8de57403743e756609670de6fb2345920e36dc5c2d914c319c945"}, ] [package.extras] check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.8.0)"] -core = ["importlib_metadata (>=6)", "jaraco.collections", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] +core = ["importlib_metadata (>=6)", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] @@ -1647,4 +1668,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "2eabc980be40c0d8c229d1321c485f7c39cfa324974cac3e94e5ccb9c480d23a" +content-hash = "f58750f63768196f9e102e42e3fc879d798855b5ef3df924f24bd56250e2ddc7" diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index a60e3c51d..4148266e1 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,15 +4,14 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.93" +version = "0.3.94" description = "" authors = [ "Runtime Verification, Inc. ", ] [tool.poetry.scripts] -convert-json = "kmir.convert_json.__main__:main" -convert-from-definition = "kmir.convert_from_definition.__main__:main" +parse = "kmir.parse.__main__:main" kmir = "kmir.__main__:main" [tool.poetry.plugins.kdist] @@ -23,7 +22,7 @@ pytest-kmir = "kmir.testing.fixtures" [tool.poetry.dependencies] python = "^3.10" -kframework = "7.1.218" +kframework = "7.1.229" [tool.poetry.group.dev.dependencies] autoflake = "*" diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index 3c0f4618f..c79b4a932 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.93' +VERSION: Final = '0.3.94' diff --git a/kmir/src/kmir/__main__.py b/kmir/src/kmir/__main__.py index ca30e6712..56babf827 100644 --- a/kmir/src/kmir/__main__.py +++ b/kmir/src/kmir/__main__.py @@ -14,8 +14,8 @@ from pyk.proof.tui import APRProofViewer from kmir.build import HASKELL_DEF_DIR, LLVM_LIB_DIR, haskell_semantics, llvm_semantics -from kmir.convert_from_definition.v2parser import parse_json from kmir.kmir import KMIR, KMIRAPRNodePrinter +from kmir.parse.parser import parse_json if TYPE_CHECKING: from collections.abc import Sequence diff --git a/kmir/src/kmir/convert_from_definition/parser.py b/kmir/src/kmir/convert_from_definition/parser.py deleted file mode 100644 index e961b9f00..000000000 --- a/kmir/src/kmir/convert_from_definition/parser.py +++ /dev/null @@ -1,154 +0,0 @@ -from __future__ import annotations - -from functools import cached_property -from typing import TYPE_CHECKING - -from pyk.kast.att import Atts -from pyk.kast.inner import KApply, KSort -from pyk.kast.outer import KTerminal - -if TYPE_CHECKING: - from collections.abc import Iterable - - from pyk.kast.outer import KDefinition, KProduction - - -JSON = dict[object, object] -ParseResult = tuple[KApply, KSort] | None - - -def _is_mir_production(prod: KProduction) -> bool: - group = prod.att.get(Atts.GROUP) - symbol = prod.att.get(Atts.SYMBOL) - return group is not None and group == 'mir' and symbol is not None - - -def _get_symbol(prod: KProduction) -> str: - symbol = prod.att.get(Atts.SYMBOL) - assert symbol - return symbol - - -def _is_mir_terminal(prod: KProduction) -> bool: - return _is_mir_production(prod) and len(prod.items) == 1 and isinstance(prod.items[0], KTerminal) - - -def _json_terminal(json: JSON) -> tuple[str, str] | None: - if len(json) != 1: - return None - - (k, v), *_ = list(json.items()) - if not isinstance(k, str) or not isinstance(v, str): - return None - - return (k, v) - - -def _json_non_terminal(json: JSON) -> tuple[str, object] | None: - if len(json) != 1: - return None - - (k, v), *_ = list(json.items()) - if not isinstance(k, str): - return None - - return (k, v) - - -def _terminal_symbol(sort: str, value: str) -> str: - return f'{sort}::{value}' - - -def _sort_name_from_json(sort: str) -> str: - return { - 'Int': 'IntTy', - 'Uint': 'UintTy', - 'Float': 'FloatTy', - }.get(sort, sort) - - -def _non_terminal_sorts(prod: KProduction) -> Iterable[KSort]: - return (nt.sort for nt in prod.non_terminals) - - -class Parser: - __definition: KDefinition - - def __init__( - self, - defn: KDefinition, - ): - self.__definition = defn - - def parse_mir_json(self, json: JSON) -> ParseResult: - maybe_terminal = self._parse_terminal(json) - if maybe_terminal is not None: - return maybe_terminal - - maybe_non_terminal = self._parse_non_terminal(json) - if maybe_non_terminal is not None: - return maybe_non_terminal - - return self._parse_other(json) - - def _parse_terminal(self, json: JSON) -> ParseResult: - maybe_terminal = _json_terminal(json) - if maybe_terminal is None: - return None - - sort, value = maybe_terminal - sort = _sort_name_from_json(sort) - - symbol = _terminal_symbol(sort, value) - if symbol not in self._mir_terminal_symbols: - return None - - return KApply(symbol), KSort(sort) - - def _parse_non_terminal(self, json: JSON) -> ParseResult: - maybe_non_terminal = _json_non_terminal(json) - if maybe_non_terminal is None: - return None - - sort, sub_object = maybe_non_terminal - sort = _sort_name_from_json(sort) - - if not isinstance(sub_object, dict): - return None - - # TODO: this will need a different entrypoint when you have N > 1 - # children; it'll do for now - maybe_child = self.parse_mir_json(sub_object) - if maybe_child is None: - return None - - child_value, child_sort = maybe_child - if (child_sort,) not in self._mir_non_terminal_symbols: - return None - - symbol = self._mir_non_terminal_symbols[(child_sort,)] - - return KApply(symbol, args=(child_value,)), KSort(sort) - - def _parse_other(self, json: JSON) -> ParseResult: - return None - - @cached_property - def _mir_productions(self) -> tuple[KProduction, ...]: - return tuple(prod for prod in self.__definition.productions if _is_mir_production(prod)) - - @cached_property - def _mir_terminals(self) -> tuple[KProduction, ...]: - return tuple(prod for prod in self._mir_productions if _is_mir_terminal(prod)) - - @cached_property - def _mir_non_terminals(self) -> tuple[KProduction, ...]: - return tuple(prod for prod in self._mir_productions if not _is_mir_terminal(prod)) - - @cached_property - def _mir_terminal_symbols(self) -> set[str]: - return {_get_symbol(prod) for prod in self._mir_terminals} - - @cached_property - def _mir_non_terminal_symbols(self) -> dict[tuple[KSort, ...], str]: - return {tuple(_non_terminal_sorts(p)): _get_symbol(p) for p in self._mir_non_terminals} diff --git a/kmir/src/kmir/convert_json/__init__.py b/kmir/src/kmir/convert_json/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/kmir/src/kmir/convert_json/__main__.py b/kmir/src/kmir/convert_json/__main__.py deleted file mode 100644 index c62b24b59..000000000 --- a/kmir/src/kmir/convert_json/__main__.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -import json -import sys - -from .convert import from_dict - - -def main() -> None: - if len(sys.argv) != 2: - exit(1) - f = open(sys.argv[1]) - data = json.load(f) - print(from_dict(data)) diff --git a/kmir/src/kmir/convert_json/convert.py b/kmir/src/kmir/convert_json/convert.py deleted file mode 100644 index 94f7f329a..000000000 --- a/kmir/src/kmir/convert_json/convert.py +++ /dev/null @@ -1,648 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Any, NoReturn - from collections.abc import Sequence, Mapping - from pyk.kast.inner import KInner - -import hashlib - -from pyk.kast.inner import KApply, KSort, KToken - -CRATE_FUNCTIONS_MAP: dict[int, Mapping[str, str]] = {} - -CRATE_ID = 0 - - -def create_unique_id(n: int) -> int: - msb = CRATE_ID.to_bytes(8, 'big') - lsb = n.to_bytes(8, 'big') - return int.from_bytes(msb + lsb, 'big') - - -def _raise_conversion_error(msg: str) -> NoReturn: - raise AssertionError(msg) - - -def _unimplemented() -> NoReturn: - raise NotImplementedError() - - -def maybe_byte_from_dict(js: int | None) -> KApply: - if js is None: - return KApply('noByte', ()) - - return KApply('someByte', (KToken(str(js), KSort('Int')))) - - -def bytes_from_dict(js: Sequence[int]) -> KApply: - if len(js) == 0: - return KApply('.maybeBytes', ()) - - return KApply('maybeBytes', (maybe_byte_from_dict(js[0]), bytes_from_dict(js[1:]))) - - -def provenance_map_entry_from_dict(js: Sequence[object]) -> KApply: - match js: - case [int(size), int(allocid)]: - return KApply( - 'provenanceMapEntry', - KToken(str(size), KSort('Int')), - KApply('allocId', KToken(str(create_unique_id(allocid)), KSort('Int'))), - ) - - _unimplemented() - - -def provenance_map_entries_from_dict(js: Sequence[Sequence[object]]) -> KApply: - if len(js) == 0: - return KApply('.provenanceMapEntries') - - return KApply( - 'provenanceMapEntries', (provenance_map_entry_from_dict(js[0]), provenance_map_entries_from_dict(js[1:])) - ) - - -def provenance_map_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'ptrs': list(ptrs)}: - return KApply('provenanceMap', provenance_map_entries_from_dict(ptrs)) - - _raise_conversion_error('') - - -def align_from_dict(n: int) -> KApply: - return KApply('align', (KToken(str(n), KSort('Int')))) - - -def allocation_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'bytes': list(bs), 'provenance': dict(provenance), 'align': int(align), 'mutability': str(mutability)}: - return KApply( - 'allocation', - ( - bytes_from_dict(bs), - provenance_map_from_dict(provenance), - align_from_dict(align), - mutability_from_dict(mutability), - ), - ) - - _raise_conversion_error('') - - -def constant_kind_from_dict(js: str | Mapping[str, object]) -> KApply: - if isinstance(js, str): - if js == 'ZeroSized': - return KApply('constantKindZeroSized_TYPES_ConstantKind', ()) - else: - _raise_conversion_error('') - else: - match js: - case {'Allocated': dict(payload)}: - return KApply( - 'constantKindAllocated(_)_TYPES_ConstantKind_Allocation', - args=[allocation_from_dict(payload)], - ) - - _raise_conversion_error('') - - -def constant_kind_from_crate_functions_map(n: int) -> KApply: - # This will throw KeyError exceptipn if the key (type id) is not in the map. - func = CRATE_FUNCTIONS_MAP[n] - match func: - case {'NormalSym': str(s)}: - hash_object = hashlib.sha256(s.encode('utf-8')) - hash_value = int.from_bytes(hash_object.digest(), 'big') - return KApply('constantKindFnDef', (KToken(str(hash_value), KSort('Int')))) - case {'IntrinsicSym': str(s)}: - return KApply('constantKindIntrinsic', (string_from_dict(s))) - case {'NoOpSym': str('')}: - return KApply('constantKindNoOp', ()) - case _: - _raise_conversion_error('') - - -def mirconstid_from_dict(n: int) -> KApply: - return KApply('mirConstId(_)_TYPES_MirConstId_Int', (KToken(str(n), KSort('Int')))) - - -def mirconst_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'kind': 'ZeroSized' as kind, 'ty': int(ty), 'id': int(id_)}: - if ty in CRATE_FUNCTIONS_MAP: - return KApply( - 'mirConst(_,_,_)_TYPES_MirConst_ConstantKind_Ty_MirConstId', - (constant_kind_from_crate_functions_map(ty), ty_from_dict(ty), mirconstid_from_dict(id_)), - ) - else: - return KApply( - 'mirConst(_,_,_)_TYPES_MirConst_ConstantKind_Ty_MirConstId', - (constant_kind_from_dict(kind), ty_from_dict(ty), mirconstid_from_dict(id_)), - ) - case {'kind': str() | dict() as kind, 'ty': int(ty), 'id': int(id_)}: - return KApply( - 'mirConst(_,_,_)_TYPES_MirConst_ConstantKind_Ty_MirConstId', - (constant_kind_from_dict(kind), ty_from_dict(ty), mirconstid_from_dict(id_)), - ) - - _raise_conversion_error('') - - -def maybe_user_type_annotation_index_from_dict(js: Mapping[str, object] | None) -> KApply: - if js is None: - return KApply('noUserTypeAnnotationIndex_BODY_MaybeUserTypeAnnotationIndex', ()) - - _unimplemented() - - -def const_operand_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'span': int(span), 'user_ty': dict() | None as user_ty, 'const_': dict(literal)}: - return KApply( - 'constOperand(_,_,_)_BODY_ConstOperand_Span_MaybeUserTypeAnnotationIndex_MirConst', - ( - span_from_dict(span), - maybe_user_type_annotation_index_from_dict(user_ty), - mirconst_from_dict(literal), - ), - ) - - _raise_conversion_error('') - - -def operand_from_dict(js: Mapping[str, object]) -> KApply: - if len(js) != 1: - _raise_conversion_error('') - - match js: - case {'Constant': dict(constant)}: - return KApply('operandConstant', (const_operand_from_dict(constant))) - case {'Copy': dict(place)}: - return KApply('operandCopy', (place_from_dict(place))) - case {'Move': dict(place)}: - return KApply('operandMove', (place_from_dict(place))) - case _: - _unimplemented() - - -def operands_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) == 0: - return KApply('.List{"___BODY_Operands_Operand_Operands"}_Operands', ()) - - return KApply('___BODY_Operands_Operand_Operands', (operand_from_dict(js[0]), operands_from_dict(js[1:]))) - - -def local_from_dict(n: int) -> KApply: - return KApply('local(_)_BODY_Local_Int', (KToken(str(n), KSort('Int')))) - - -def projection_elems_from_dict(js: Sequence[Any]) -> KApply: - if len(js) == 0: - return KApply('.List{"___BODY_ProjectionElems_ProjectionElem_ProjectionElems"}_ProjectionElems', ()) - - _unimplemented() # TODO: define projection_elem and apply as to other list sorts_from_dict - - -def place_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'local': int(local), 'projection': list(projection)}: - return KApply( - 'place(_,_)_BODY_Place_Local_ProjectionElems', - (local_from_dict(local), projection_elems_from_dict(projection)), - ) - - _raise_conversion_error('') - - -def basicblock_idx_from_dict(js: int) -> KApply: - return KApply('basicBlockIdx', (KToken(str(js), KSort('Int')))) - - -def maybe_basicblock_idx_from_dict(js: int | None) -> KApply: - if js is None: - return KApply('noBasicBlockIdx', ()) - - return KApply('someBasicBlockIdx', (basicblock_idx_from_dict(js))) - - -def unwind_action_from_dict(js: str) -> KApply: - if js == 'Continue': - return KApply('unwindActionContinue_BODY_UnwindAction', ()) - if js == 'Unreachable': - return KApply('unwindActionUnreachable_BODY_UnwindAction', ()) - - _unimplemented() - - -def terminator_kind_from_dict(js: str | Mapping[str, object]) -> KApply: - if isinstance(js, str): - if js == 'Return': - return KApply('terminatorKindReturn', ()) - _unimplemented() - else: - if len(js) != 1: - _raise_conversion_error('') - match js: - case {'Call': dict(call)}: - return KApply( - 'terminatorKindCall', - ( - operand_from_dict(call['func']), - operands_from_dict(call['args']), - place_from_dict(call['destination']), - maybe_basicblock_idx_from_dict(call['target']), - unwind_action_from_dict(call['unwind']), - ), - ) - case _: - _unimplemented() - - -def terminator_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'kind': str() | dict() as kind, 'span': int(span)}: - return KApply( - 'terminator(_,_)_BODY_Terminator_TerminatorKind_Span', - (terminator_kind_from_dict(kind), span_from_dict(span)), - ) - - _raise_conversion_error('') - - -def binop_from_dict(s: str) -> KApply: - return KApply(f'binOp{s}', ()) - - -def rvalue_binary_op_from_dict(js: Sequence[str | Mapping[str, object]]) -> KApply: - if len(js) != 3: - _raise_conversion_error('') - match js: - case ['Shr' as s, dict(operand1), dict(operand2)]: - return KApply( - 'rvalueBinaryOp', - (binop_from_dict(s), operand_from_dict(operand1), operand_from_dict(operand2)), - ) - - _unimplemented() - - -def cast_kind_from_dict(s: str) -> KApply: - return KApply(f'castKind{s}', ()) - - -def rvalue_cast_from_dict(js: Sequence[str | Mapping[str, object]]) -> KApply: - if len(js) != 3: - _raise_conversion_error('') - match js: - case ['IntToInt' as s, dict(operand), int(ty)]: - return KApply( - 'rvalueCast', - (cast_kind_from_dict(s), operand_from_dict(operand), ty_from_dict(ty)), - ) - _unimplemented() - - -def variant_idx_from_dict(js: int) -> KApply: - return KApply('variantIdx', (KToken(str(js), KSort('Int')))) - - -def field_idx_from_dict(js: int) -> KApply: - return KApply('fieldIdx', (KToken(str(js), KSort('Int')))) - - -def maybe_field_idx_from_dict(js: int | None) -> KApply: - if js is None: - return KApply('noFieldIdx', ()) - - return KApply('someFieldIdx', (field_idx_from_dict(js))) - - -def generic_arg_from_dict(js: Mapping[str, object]) -> KApply: - _unimplemented() - - -def generic_args_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) == 0: - return KApply('.genericArgs') - - return KApply('genericArgs', (generic_arg_from_dict(js[0]), generic_args_from_dict(js[1:]))) - - -def aggregate_kind_adt_from_dict( - js: list[int | Sequence[Mapping[str, object]] | Mapping[str, object] | None], -) -> KApply: - if len(js) != 5: - _raise_conversion_error('') - return KApply( - 'aggregateKindAdt', - ( - KToken(str(js[0]), KSort('Int')), - variant_idx_from_dict(js[1]), # type: ignore - generic_args_from_dict(js[2]), # type: ignore - maybe_user_type_annotation_index_from_dict(js[3]), # type: ignore - maybe_field_idx_from_dict(js[4]), # type: ignore - ), - ) - - -def rvalue_aggregate_from_dict(js: Sequence[str | Mapping[str, object] | Sequence[Mapping[str, object]]]) -> KApply: - if len(js) != 2: - _raise_conversion_error('') - match js: - case ['Tuple' as s, list(operands)]: - return KApply( - 'rvalueAggregate', - (KApply(f'aggregateKind{s}', ()), operands_from_dict(operands)), - ) - case [{'Adt': list(adtinfo)}, list(operands)]: - return KApply( - 'rvalueAggregate', - (aggregate_kind_adt_from_dict(adtinfo), operands_from_dict(operands)), - ) - case _: - _unimplemented() - - -def rvalue_from_dict(js: Mapping[str, object]) -> KApply: - if len(js) != 1: - _raise_conversion_error('') - match js: - case {'BinaryOp': list(payload)}: - return rvalue_binary_op_from_dict(payload) - case {'Cast': list(payload)}: - return rvalue_cast_from_dict(payload) - case {'Aggregate': list(payload)}: - return rvalue_aggregate_from_dict(payload) - case _: - _unimplemented() - - -def statement_kind_assign_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) != 2: - _raise_conversion_error('') - match js: - case [dict(place), dict(rval)]: - return KApply('statementKindAssign', (place_from_dict(place), rvalue_from_dict(rval))) - _raise_conversion_error('') - - -def statement_kind_from_dict(js: str | Mapping[str, object]) -> KApply: - if isinstance(js, str): - _unimplemented() - else: - match js: - case {'Assign': list(payload)}: - return statement_kind_assign_from_dict(payload) - case {'StorageLive': int(local)}: - return KApply('statementKindStorageLive', (local_from_dict(local))) - case {'StorageDead': int(local)}: - return KApply('statementKindStorageDead', (local_from_dict(local))) - case _: - _unimplemented() - - -def statement_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'kind': str() | dict() as kind, 'span': int(span)}: - return KApply( - 'statement(_,_)_BODY_Statement_StatementKind_Span', - (statement_kind_from_dict(kind), span_from_dict(span)), - ) - _raise_conversion_error('') - - -def statements_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) == 0: - return KApply('.List{"___BODY_Statements_Statement_Statements"}_Statements', ()) - - return KApply('___BODY_Statements_Statement_Statements', (statement_from_dict(js[0]), statements_from_dict(js[1:]))) - - -def basicblock_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'statements': list(statements), 'terminator': dict(terminator)}: - return KApply( - 'basicBlock(_,_)_BODY_BasicBlock_Statements_Terminator', - (statements_from_dict(statements), terminator_from_dict(terminator)), - ) - - _raise_conversion_error('') - - -def basicblocks_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) == 0: - return KApply('.List{"___BODY_BasicBlocks_BasicBlock_BasicBlocks"}_BasicBlocks', ()) - - return KApply( - '___BODY_BasicBlocks_BasicBlock_BasicBlocks', (basicblock_from_dict(js[0]), basicblocks_from_dict(js[1:])) - ) - - -def ty_from_dict(n: int) -> KApply: - return KApply('ty', (KToken(str(n), KSort('Int')), KApply('TyKind::RigidTy', (KApply('rigidTyUnimplemented'),)))) - - -def mutability_from_dict(s: str) -> KApply: - return KApply(f'mutability{s.capitalize()}_BODY_Mutability', ()) - - -def localdecl_from_dict(js: Mapping[str, object]) -> KInner: - match js: - case {'ty': int(ty), 'span': int(span), 'mutability': str(mutability)}: - return KApply( - 'localDecl(_,_,_)_BODY_LocalDecl_Ty_Span_Mutability', - (ty_from_dict(ty), span_from_dict(span), mutability_from_dict(mutability)), - ) - - _raise_conversion_error('') - - -def localdecls_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) == 0: - return KApply('.List{"___BODY_LocalDecls_LocalDecl_LocalDecls"}_LocalDecls', ()) - - return KApply('___BODY_LocalDecls_LocalDecl_LocalDecls', (localdecl_from_dict(js[0]), localdecls_from_dict(js[1:]))) - - -def arg_count_from_dict(n: int) -> KToken: - return KToken(str(n), KSort('Int')) - - -def var_debug_infos_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - # Ignore var_debug_info for now - return KApply('.List{"___BODY_VarDebugInfos_VarDebugInfo_VarDebugInfos"}_VarDebugInfos', ()) - - -def maybe_local_from_dict(js: int | Mapping[str, object] | None) -> KApply: - match js: - case None: - return KApply('noLocal_BODY_MaybeLocal', ()) - case _: - _unimplemented() - - -def span_from_dict(n: int) -> KApply: - return KApply('span(_)_TYPES_Span_Int', (KToken(str(n), KSort('Int')))) - - -def global_alloc_from_dict(js: tuple[int, Mapping[str, object]]) -> KApply: - match js: - case [int(n), {'Memory': dict(allocation)}]: - return KApply( - 'globalAllocEntry', - (KToken(str(n), KSort('Int')), KApply('globalAllocMemory', (allocation_from_dict(allocation)))), - ) - case [int(n), {'Static': int(s)}]: - return KApply( - 'globalAllocEntry', - (KToken(str(n), KSort('Int')), KApply('globalAllocStatic', (KToken(str(s), KSort('Int'))))), - ) - case _: - _unimplemented() - - -def global_allocs_from_dict(js: Sequence[tuple[int, Mapping[str, object]]]) -> KApply: - if len(js) == 0: - return KApply('.globalAllocsMap') - - return KApply('globalAllocsMap', (global_alloc_from_dict(js[0]), global_allocs_from_dict(js[1:]))) - - -def body_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case { - 'blocks': list(blocks), - 'locals': list(locals), - 'arg_count': int(arg_count), - 'var_debug_info': list(var_debug_infos), - 'spread_arg': int(_) | None as spread_arg, - 'span': int(span), - }: - return KApply( - 'body(_,_,_,_,_,_)_BODY_Body_BasicBlocks_LocalDecls_Int_VarDebugInfos_MaybeLocal_Span', - ( - basicblocks_from_dict(blocks), - localdecls_from_dict(locals), - arg_count_from_dict(arg_count), - var_debug_infos_from_dict(var_debug_infos), - maybe_local_from_dict(spread_arg), - span_from_dict(span), - ), - ) - - _raise_conversion_error('') - - -def defid_from_dict(n: int) -> KApply: - # return KApply('defId', (KToken('\"' + str(n) + '\"', KSort('String')))) - return KApply('defId', (KToken(str(n), KSort('Int')))) - - -def bodies_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) == 0: - return KApply('.bodies') - - return KApply('bodies', (body_from_dict(js[0]), bodies_from_dict(js[1:]))) - - -def string_from_dict(js: str) -> KToken: - return KToken('\"' + js + '\"', KSort('String')) - - -def mono_item_fn_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case { - 'body': list(bodies), - 'id': int(id), - 'name': str(name), - }: - return KApply( - 'monoItemFn', - ( - string_from_dict(name), - defid_from_dict(id), - bodies_from_dict(bodies), - ), - ) - - _raise_conversion_error('') - - -def mono_item_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case {'MonoItemFn': dict(payload)}: - return mono_item_fn_from_dict(payload) - case {'MonoItemStatic': dict()}: - _unimplemented() - case {'MonoItemGlobalAsm': dict()}: - _unimplemented() - _raise_conversion_error('') - - -def mono_item_wrapper_from_dict(js: Mapping[str, object]) -> KApply: - match js: - case { - 'symbol_name': str(name), - 'mono_item_kind': dict(mono_item), - 'details': str(_) | None, - }: - return KApply( - 'monoItemWrapper', - ( - string_from_dict(name), - mono_item_from_dict(mono_item), - ), - ) - - _raise_conversion_error('') - - -def mono_items_from_dict(js: Sequence[Mapping[str, object]]) -> KApply: - if len(js) == 0: - return KApply('.monoItems') - - return KApply('monoItems', (mono_item_wrapper_from_dict(js[0]), mono_items_from_dict(js[1:]))) - - -def function_map_entry_from_dict(js: tuple[int, Mapping[str, str]]) -> None: - match js: - case [int(n), dict(payload)]: - CRATE_FUNCTIONS_MAP[n] = payload - case _: - _raise_conversion_error('') - - -def functions_map_from_dict(js: Sequence[tuple[int, Mapping[str, str]]]) -> None: - if len(js) == 0: - return - - function_map_entry_from_dict(js[0]) - functions_map_from_dict(js[1:]) - - -def from_dict(js: Mapping[str, object]) -> KInner: - match js: - case { - 'name': str(name), - 'crate_id': int(id), - 'allocs': list(allocs), - 'functions': list(functions), - 'items': list(items), - }: - global CRATE_ID - CRATE_ID = id - functions_map_from_dict(functions) - return KApply( - 'pgm', - ( - string_from_dict(name), - global_allocs_from_dict(allocs), - mono_items_from_dict(items), - ), - ) - - _raise_conversion_error('') diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index 209d8403c..1ea57c0a5 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -419,10 +419,13 @@ value is the value in local `_0`, and will go to the _destination_ in the `LOCALS` of the caller's stack frame. Execution continues with the context of the enclosing stack frame, at the _target_. +If the returned value is a `Reference`, its stack height must be decremented because a stack frame is popped. +NB that a stack height of `0` cannot occur here, because the compiler prevents local variable references from escaping. + ```k rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - LOCAL0 ~> #setLocalValue(DEST) ~> #execBlockIdx(TARGET) ~> .K + #decrementRef(LOCAL0) ~> #setLocalValue(DEST) ~> #execBlockIdx(TARGET) ~> .K _ => CALLER // @@ -520,8 +523,9 @@ where the returned result should go. rule #tyOfCall(_) => ty(-1) [owise] // copy, move, non-zero size: not supported ``` -The local data has to be set up for the call, which requires information about the local variables of a call. This step is separate from the above call stack setup because it needs to retrieve the locals declaration from the body. Arguments to the call are `Operands` which refer to the old locals (`OLDLOCALS` below), and the data is either _copied_ into the new locals using `#setArgs`, or it needs to be _shared_ via references into the heap, i.e., the reference needs to be copied -(NB: A function won't ever access any other function call's `local` variables). +The local data has to be set up for the call, which requires information about the local variables of a call. This step is separate from the above call stack setup because it needs to retrieve the locals declaration from the body. Arguments to the call are `Operands` which refer to the old locals (`OLDLOCALS` below), and the data is either _copied_ into the new locals using `#setArgs`, or it needs to be _shared_ via references. + +An operand may be a `Reference` (the only way a function could access another function call's `local` variables). For this case, the stack height in the `Reference` must be incremented because a stack frame is added. ```k syntax KItem ::= #setUpCalleeData(MonoItemKind, Operands) @@ -550,7 +554,7 @@ The local data has to be set up for the call, which requires information about t syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) - // once all arguments have been retrieved, write caller's modified CALLERLOCALS to stack frame and execute + // once all arguments have been retrieved, execute rule #setArgsFromStack(_, .Operands) ~> CONT => CONT // set arguments one by one, marking off moved operands in the provided (caller) LOCALS @@ -567,7 +571,7 @@ The local data has to be set up for the call, which requires information about t rule #setArgFromStack(IDX, operandCopy(place(local(I), .ProjectionElems))) => - {CALLERLOCALS[I]}:>TypedLocal ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List @@ -579,7 +583,7 @@ The local data has to be set up for the call, which requires information about t rule #setArgFromStack(IDX, operandMove(place(local(I), .ProjectionElems))) => - {CALLERLOCALS[I]}:>TypedLocal ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS => CALLERLOCALS[I <- Moved])) _:List diff --git a/kmir/src/kmir/kdist/mir-semantics/rt/data.md b/kmir/src/kmir/kdist/mir-semantics/rt/data.md index 222dd1d33..4f10c9cfa 100644 --- a/kmir/src/kmir/kdist/mir-semantics/rt/data.md +++ b/kmir/src/kmir/kdist/mir-semantics/rt/data.md @@ -353,7 +353,7 @@ The most basic ones are simply accessing an operand, either directly or by way o A number of unary and binary operations exist, (which are dependent on the operand types). ```k -// BinaryOp, UnaryOp. NullaryOp: not implemented yet. +// BinaryOp, UnaryOp. NullaryOp: dependent on value representation. See below ``` Other `RValue`s exist in order to construct or operate on arrays and slices, which are built into the language. @@ -404,11 +404,35 @@ Tuples and structs are built as `Aggregate` values with a list of argument value // Discriminant, ShallowIntBox: not implemented yet ``` +### References and Dereferencing -References and de-referencing is another family of `RValue`s. +References and de-referencing give rise to another family of `RValue`s. + +References can be created using a particular region kind (not used here) and `BorrowKind`. +The `BorrowKind` indicates mutability of the value through the reference, but also provides more find-grained characteristics of mutable references. These fine-grained borrow kinds are not represented here, as some of them are disallowed in the compiler phase targeted by this semantics, and others related to memory management in lower-level artefacts[^borrowkind]. Therefore, reference values are represented with a simple `Mutability` flag instead of `BorrowKind` + +[^borrowkind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.BorrowKind.html ```k -// Ref, AddressOf, CopyForDeref: not implemented yet + rule rvalueRef(_REGION, KIND, PLACE) + => + typedLocal(Reference(0, PLACE, #mutabilityOf(KIND)), TyUnknown, #mutabilityOf(KIND)) + ... + + + syntax Mutability ::= #mutabilityOf ( BorrowKind ) [function, total] + + rule #mutabilityOf(borrowKindShared) => mutabilityNot + rule #mutabilityOf(borrowKindFake(_)) => mutabilityNot // Shallow fake borrow disallowed in late stages + rule #mutabilityOf(borrowKindMut(_)) => mutabilityMut // all mutable kinds behave equally for us +``` + +A `CopyForDeref` `RValue` has the semantics of a simple `Use(operandCopy(...))`, except that the compiler guarantees the only use of the copied value will be for dereferencing, which enables optimisations in the borrow checker and in code generation. + +```k + rule rvalueCopyForDeref(PLACE) => rvalueUse(operandCopy(PLACE)) ... + +// AddressOf: not implemented yet ``` ## Type casts @@ -435,6 +459,7 @@ Values in MIR are allocated arrays of `Bytes` that are interpreted according to ```k syntax Value ::= value ( Bytes , RigidTy ) | Aggregate( List ) // retaining field structure of struct or tuple types + | Reference( Int , Place , Mutability ) // stack depth (initially 0), place, borrow kind ``` ```k @@ -458,6 +483,7 @@ Values in MIR can also be represented at a certain abstraction level, interpreti High-level values can be - a range of built-in types (signed and unsigned integer numbers, floats, `str` and `bool`) - built-in product type constructs (`struct`s, `enum`s, and tuples, with heterogenous component types) +- references to a place in the current or an enclosing stack frame - arrays and slices (with homogenous element types) **This sort is work in progress and will be extended and modified as we go** @@ -474,6 +500,8 @@ module RT-DATA-HIGH-SYNTAX // heterogenous value list for tuples and structs (standard, tuple, or anonymous) | Float( Float, Int ) // value, bit-width for f16-f128 + | Reference( Int , Place , Mutability ) + // stack depth (initially 0), place, borrow kind // | Ptr( Address, MaybeValue ) // FIXME why maybe? why value? // address, metadata for ref/ptr // | Range( List ) @@ -560,7 +588,11 @@ The `Value` sort above operates at a higher level than the bytes representation Integer(Bytes2Int(BYTES, LE, Signed), 128, true) requires lengthBytes(BYTES) ==Int 16 // Isize for 64bit platforms - rule #decodeConstant(constantKindAllocated(allocation(BYTES, _, _, _)), rigidTyInt(intTyIsize)) => Integer(Bytes2Int(BYTES, LE, Signed), 64, false) requires lengthBytes(BYTES) ==Int 8 + rule #decodeConstant(constantKindAllocated(allocation(BYTES, _, _, _)), rigidTyInt(intTyIsize)) + => + Integer(Bytes2Int(BYTES, LE, Signed), 64, true) + requires lengthBytes(BYTES) ==Int 8 + ///////////////////////////////////////////////////////////////////////////////////////////////// // TODO Float decoding: not supported natively in K @@ -723,32 +755,225 @@ A `Field` access projection operates on `struct`s and tuples, which are represen [preserves-definedness] // valid list indexing checked ``` -#### Writing data to places with projections +A `Deref` projection operates on `Reference`s that refer to locals in the same or an enclosing stack frame, indicated by the stack height in the `Reference` value. `Deref` reads the referred place (and may proceed with further projections). -When writing data to a place with projections, the updated value gets constructed recursively by a function over the projections. +In the simplest case, the reference refers to a local in the same stack frame (height 0), which is directly read. ```k - syntax TypedLocal ::= #updateProjected( TypedLocal, ProjectionElems, TypedLocal) [function] + rule #readProjection( + typedLocal(Reference(0, place(local(I:Int), PLACEPROJS:ProjectionElems), _), _, _), + projectionElemDeref PROJS:ProjectionElems + ) + => + #readProjection({LOCALS[I]}:>TypedLocal, appendP(PLACEPROJS, PROJS)) + ... + + LOCALS + requires 0 NEW + // why do we not have this automatically for user-defined lists? + syntax ProjectionElems ::= appendP ( ProjectionElems , ProjectionElems ) [function, total] + rule appendP(.ProjectionElems, TAIL) => TAIL + rule appendP(X:ProjectionElem REST:ProjectionElems, TAIL) => X appendP(REST, TAIL) - rule #updateProjected( - typedLocal(Aggregate(ARGS), TY, MUT), - projectionElemField(fieldIdx(I), _TY) PROJS, - NEW) - => - typedLocal(Aggregate(ARGS[I <- #updateProjected({ARGS[I]}:>TypedLocal, PROJS, NEW)]), TY, MUT) ``` +For references to enclosing stack frames, the local must be retrieved from the respective stack frame. +An important prerequisite of this rule is that when passing references to a callee as arguments, the stack height must be adjusted. + +```k + rule #readProjection( + typedLocal(Reference(FRAME, place(LOCAL:Local, PLACEPROJS), _), _, _), + projectionElemDeref PROJS + ) + => + #readProjection(#localFromFrame({STACK[FRAME -Int 1]}:>StackFrame, LOCAL, FRAME), appendP(PLACEPROJS, PROJS)) + ... + + STACK + requires 0 #adjustRef({LOCALS[I]}:>TypedLocal, OFFSET) + requires 0 <=Int I + andBool I typedLocal(Reference(HEIGHT +Int OFFSET, PLACE, REFMUT), TY, MUT) + rule #adjustRef(TL, _) => TL [owise] + + rule #incrementRef(TL) => #adjustRef(TL, 1) + rule #decrementRef(TL) => #adjustRef(TL, -1) +``` + +### Writing data to places with projections + +A `Deref` projection in the projections list changes the target of the write operation, while `Field` updates change the value that is being written (updating just one field of it, recursively). `Index`ing operations may have to read an index from another local, which is another rewrite. Therefore a simple update _function_ cannot cater for all projections, neither can a rewrite (the context of the recursion would need to be held explicitly). + +The solution is to use rewrite operations in a downward pass through the projections, and build the resulting updated value in an upward pass with information collected in the downward one. + +```k + syntax WriteTo ::= toLocal ( Int ) + | toStack ( Int , Local ) + + syntax KItem ::= #projectedUpdate ( WriteTo , TypedLocal, ProjectionElems, TypedLocal, Contexts , Bool ) + + syntax TypedLocal ::= #buildUpdate ( TypedLocal, Contexts ) [function] + + // retains information about the value that was deconstructed by a projection + syntax Context ::= CtxField( Ty, List, Int ) + // | array context will be added here + + syntax Contexts ::= List{Context, ""} + + rule #buildUpdate(VAL, .Contexts) => VAL + + rule #buildUpdate(VAL, CtxField(TY, ARGS, I) CTXS) + => #buildUpdate(typedLocal(Aggregate(ARGS[I <- VAL]), TY, mutabilityMut), CTXS) + + rule #projectedUpdate( + DEST, + typedLocal(Aggregate(ARGS), TY, MUT), + projectionElemField(fieldIdx(I), _) PROJS, + UPDATE, + CTXTS, + FORCE + ) => + #projectedUpdate(DEST, {ARGS[I]}:>TypedLocal, PROJS, UPDATE, CtxField(TY, ARGS, I) CTXTS, FORCE) + ... + + requires 0 <=Int I + andBool I #projectedUpdate( + _DEST, + typedLocal(Reference(OFFSET, place(LOCAL, PLACEPROJ), MUT), _, _), + projectionElemDeref PROJS, + UPDATE, + _CTXTS, + FORCE + ) + => + #projectedUpdate( + toStack(OFFSET, LOCAL), + #localFromFrame({STACK[OFFSET -Int 1]}:>StackFrame, LOCAL, OFFSET), + appendP(PLACEPROJ, PROJS), // apply reference projections first, then rest + UPDATE, + .Contexts, // previous contexts obsolete + FORCE + ) + ... + + STACK + requires 0 #projectedUpdate( + _DEST, + typedLocal(Reference(OFFSET, place(local(I), PLACEPROJ), MUT), _, _), + projectionElemDeref PROJS, + UPDATE, + _CTXTS, + FORCE + ) + => + #projectedUpdate( + toLocal(I), + {LOCALS[I]}:>TypedLocal, + appendP(PLACEPROJ, PROJS), // apply reference projections first, then rest + UPDATE, + .Contexts, // previous contexts obsolete + FORCE + ) + ... + + LOCALS + requires OFFSET ==Int 0 + andBool 0 <=Int I + andBool I #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, false) + => + #buildUpdate(NEW, CONTEXTS) ~> #setLocalValue(place(local(I), .ProjectionElems)) + ... + + + rule #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, true) + => + #buildUpdate(NEW, CONTEXTS) ~> #forceSetLocal(local(I)) + ... + + + syntax KItem ::= #forceSetLocal ( Local ) + + // #forceSetLocal sets the given value unconditionally (to write Moved values) + rule VALUE:TypedLocal ~> #forceSetLocal(local(I)) + => + .K + ... + + LOCALS => LOCALS[I <- VALUE] + requires 0 <=Int I + andBool I #projectedUpdate(toStack(FRAME, local(I)), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, _) => .K ... + STACK + => + STACK[(FRAME -Int 1) <- + #updateStackLocal({STACK[FRAME -Int 1]}:>StackFrame, I, #buildUpdate(NEW, CONTEXTS)) + ] + + requires 0 StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- Moved]) + requires 0 <=Int I + andBool I StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)]) + requires 0 <=Int I + andBool I VAL ~> #setLocalValue(place(local(I), PROJ)) => - // #readProjection(LOCAL, PROJ) ~> #checkTypeMatch(VAL) ~> // optional, type-check and projection check - #updateProjected({LOCALS[I]}:>TypedLocal, PROJ, VAL) ~> #setLocalValue(place(local(I), .ProjectionElems)) + #projectedUpdate(toLocal(I), {LOCALS[I]}:>TypedLocal, PROJ, VAL, .Contexts, false) ... LOCALS @@ -757,10 +982,12 @@ We could first read the original value using `#readProjection` and compare the t andBool PROJ =/=K .ProjectionElems andBool isTypedLocal(LOCALS[I]) [preserves-definedness] + ``` -Reading `Moved` operands requires a write operation to the read place, too, however the mutability should be ignored. -Therefore a wrapper `#forceSetLocal` is used to side-step the mutability error in `#setLocalValue`. +#### Moving operands under projections + +Reading `Moved` operands requires a write operation to the read place, too, however the mutability should be ignored while computing the update. ```k rule #readOperand(operandMove(place(local(I) #as LOCAL, PROJECTIONS))) @@ -777,27 +1004,14 @@ Therefore a wrapper `#forceSetLocal` is used to side-step the mutability error i [preserves-definedness] // valid list indexing checked syntax KItem ::= #markMoved ( TypedLocal, Local, ProjectionElems ) - | #forceSetLocal ( Local ) - rule VAL:TypedLocal ~> #markMoved(OLDLOCAL, LOCAL, PROJECTIONS) ~> CONT + rule VAL:TypedLocal ~> #markMoved(OLDLOCAL, local(I), PROJECTIONS) ~> CONT => - #updateProjected(OLDLOCAL, PROJECTIONS, Moved) - ~> #forceSetLocal(LOCAL) + #projectedUpdate(toLocal(I), OLDLOCAL, PROJECTIONS, Moved, .Contexts, true) ~> VAL ~> CONT - [preserves-definedness] // projections already used when reading, updateProjected should succeed - - // #forceSetLocal sets the given value unconditionally - rule VALUE:TypedLocal ~> #forceSetLocal(local(I)) - => - .K - ... - - LOCALS => LOCALS[I <- VALUE] - requires 0 <=Int I - andBool I argparse.Namespace: diff --git a/kmir/src/kmir/convert_from_definition/notes.md b/kmir/src/kmir/parse/notes.md similarity index 100% rename from kmir/src/kmir/convert_from_definition/notes.md rename to kmir/src/kmir/parse/notes.md diff --git a/kmir/src/kmir/convert_from_definition/v2parser.py b/kmir/src/kmir/parse/parser.py similarity index 100% rename from kmir/src/kmir/convert_from_definition/v2parser.py rename to kmir/src/kmir/parse/parser.py diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.rs b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.rs new file mode 100644 index 000000000..39aa40c69 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.rs @@ -0,0 +1,10 @@ +fn main() { + // double references + let x = 42i8; + let y = &x; + let z = &y; + + assert!(**z == x); // uses CopyForDeref(*z) + + assert!(z == &&x); // compare instance &&i8, uses &&&i8 arguments +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json new file mode 100644 index 000000000..0b911681f --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json @@ -0,0 +1,2695 @@ +{ + "name": "doubleRef", + "crate_id": 246159900629197788, + "allocs": [ + [ + 3, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 122, + 32, + 61, + 61, + 32, + 38, + 38, + 120 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 2, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 42, + 42, + 122, + 32, + 61, + 61, + 32, + 120 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 31, + { + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E" + } + ], + [ + 23, + { + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE" + } + ], + [ + 32, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 26, + { + "NormalSym": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E" + } + ], + [ + 35, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E" + } + ], + [ + 29, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::eq", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 58, + "mutability": "Not" + }, + { + "ty": 25, + "span": 59, + "mutability": "Not" + }, + { + "ty": 22, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 58, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 59, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 60 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 61 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + }, + { + "ty": 30, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 10 + } + } + } + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 66, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 66, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 67 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::eq", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 44 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 44 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 45 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 45 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 46 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 47 + }, + { + "kind": { + "StorageDead": 3 + }, + "span": 47 + } + ], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 48, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 49, + "mutability": "Not" + }, + { + "ty": 22, + "span": 50, + "mutability": "Not" + }, + { + "ty": 2, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 45, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 49, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 50, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 51 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN9doubleRef4main17h95ea92da4b4a3e96E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 11 + } + } + } + } + ] + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 70 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [] + } + ] + } + ] + }, + "span": 71 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CopyForDeref": { + "local": 3, + "projection": [ + "Deref" + ] + } + } + ] + }, + "span": 72 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 13, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 72 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 68 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 68 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 3, + "projection": [] + } + ] + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 11, + "projection": [] + } + ] + } + ] + }, + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 10, + "projection": [] + } + ] + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 12 + } + } + }, + "args": [ + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Move": { + "local": 9, + "projection": [] + } + } + ], + "destination": { + "local": 7, + "projection": [] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 73 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 77, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 33, + "id": 14 + } + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 + } + } + }, + "span": 73 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 33, + "id": 15 + } + } + } + ], + "destination": { + "local": 12, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 79 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 81, + "mutability": "Not" + }, + { + "ty": 22, + "span": 82, + "mutability": "Not" + }, + { + "ty": 25, + "span": 83, + "mutability": "Not" + }, + { + "ty": 21, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 34, + "span": 77, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 76, + "mutability": "Not" + }, + { + "ty": 22, + "span": 75, + "mutability": "Not" + }, + { + "ty": 34, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 83, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 81, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 82, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 83, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h7861fc27b244f735E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 62, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 62 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h00fbe264978df755E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h484e2183c4c007e2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 8 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::eq", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 58, + "mutability": "Not" + }, + { + "ty": 24, + "span": 59, + "mutability": "Not" + }, + { + "ty": 25, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 58, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 59, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 60 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state new file mode 100644 index 000000000..473de3a2a --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -0,0 +1,76 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( -1 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionUnreachable + + + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityMut ) ) + + + + .List + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) .Bodies ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) + ty ( 29 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 21 ) |-> rigidTyBool + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/escapingScope.rs b/kmir/src/tests/integration/data/exec-smir/references/escapingScope.rs new file mode 100644 index 000000000..d7b206e1a --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/escapingScope.rs @@ -0,0 +1,17 @@ +fn main() { + let x = 42i8; + + unsafe { + let z = f(&x); + assert!(*z == x); + } +} + +unsafe fn f(_:&i8) -> &i8{ + let x = 42; + unsafe { + let y = &x; + // does not compile! (good) + return y; + } +} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.rs b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.rs new file mode 100644 index 000000000..ecd60ba8d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.rs @@ -0,0 +1,17 @@ +fn main() { + let mut x = 42i8; + + f(&mut x); + + assert!(x == 32); + + let xref = &mut x; + + *xref = 22; + + assert!(x == 22); +} + +fn f(y: &mut i8) { + *y = 32 +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json new file mode 100644 index 000000000..c0bd3bf34 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json @@ -0,0 +1,2128 @@ +{ + "name": "mutableRef", + "crate_id": 4352655527695101489, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 120, + 32, + 61, + 61, + 32, + 51, + 50 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 120, + 32, + 61, + 61, + 32, + 50, + 50 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E" + } + ], + [ + 35, + { + "NoOpSym": "" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E" + } + ], + [ + 25, + { + "NormalSym": "_ZN10mutableRef1f17h63ad688e5733c791E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN10mutableRef1f17h63ad688e5733c791E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 15 + } + } + } + } + ] + }, + "span": 70 + } + ], + "terminator": { + "kind": "Return", + "span": 68 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 72, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h31f06fb090d8c3a3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN10mutableRef4main17h93ec5d833ede8e5dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 32, + 2 + ] + ], + "otherwise": 3 + } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 22 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 11 + } + } + } + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "span": 60 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 22, + 4 + ] + ], + "otherwise": 5 + } + } + }, + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 13 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 14 + } + } + } + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 66, + "mutability": "Not" + }, + { + "ty": 2, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 63, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "xref", + "source_info": { + "span": 66, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 67 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h8964be79673df687E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hca02380bc74841bfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state new file mode 100644 index 000000000..62b92a680 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -0,0 +1,69 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( -1 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionUnreachable + + + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityMut ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + + + + .List + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + + + diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.rs b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.rs new file mode 100644 index 000000000..2095783dc --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.rs @@ -0,0 +1,11 @@ +fn main() { + let x = 42i8; + + let z = f(&x); + + assert!(z == x); +} + +fn f(y: &i8) -> i8{ + *y +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json new file mode 100644 index 000000000..917211b8f --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json @@ -0,0 +1,1888 @@ +{ + "name": "refAsArg", + "crate_id": 2235820254418791243, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 122, + 32, + 61, + 61, + 32, + 120 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E" + } + ], + [ + 31, + { + "NoOpSym": "" + } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE" + } + ], + [ + 25, + { + "NormalSym": "_ZN8refAsArg1f17h5a492bff7ee056a4E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN8refAsArg4main17h0353e8a47bed147aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 56 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h466a9b165e00f7ddE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hb0648255f9b804cbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN8refAsArg1f17h5a492bff7ee056a4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 62 + } + ], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 64, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 65 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb11b6a9b578c8caaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 29, + { + "RigidTy": "Bool" + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state new file mode 100644 index 000000000..298d04c3e --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -0,0 +1,64 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( -1 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionUnreachable + + + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + + + + .List + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 29 ) |-> rigidTyBool + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.rs b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.rs new file mode 100644 index 000000000..705e5c9d0 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.rs @@ -0,0 +1,16 @@ +// references across several function calls +fn main() { + let x = 42i8; + + let z = f(&x); + + assert!(z == x); +} + +// returning references (back, not from locals) +fn f(x:&i8) -> i8 { + g(x) +} +fn g(x:&i8) -> i8 { + *x +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json new file mode 100644 index 000000000..b1465fb81 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json @@ -0,0 +1,1984 @@ +{ + "name": "refAsArg2", + "crate_id": 15327148825203814074, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 122, + 32, + 61, + 61, + 32, + 120 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE" + } + ], + [ + 32, + { + "NoOpSym": "" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 25, + { + "NormalSym": "_ZN9refAsArg21f17h3824ba4b7ccb016dE" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE" + } + ], + [ + 31, + { + "NormalSym": "_ZN9refAsArg21g17h9b15e23b800227b9E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hd928bd1477e89e88E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN9refAsArg21g17h9b15e23b800227b9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "g", + "id": 8, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 68 + } + ], + "terminator": { + "kind": "Return", + "span": 67 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 70, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 71 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN9refAsArg24main17hb3acdb099b5ffc5aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 56 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h3f415fb1ec534b7eE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN9refAsArg21f17h3824ba4b7ccb016dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 66 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hfd3c47538863b2f4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 29, + { + "RigidTy": "Bool" + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state new file mode 100644 index 000000000..8e72e0025 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -0,0 +1,65 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( -1 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionUnreachable + + + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + + + + .List + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) .Bodies ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 29 ) |-> rigidTyBool + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.rs b/kmir/src/tests/integration/data/exec-smir/references/refReturned.rs new file mode 100644 index 000000000..43bfc2127 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.rs @@ -0,0 +1,16 @@ +fn main() { + let x = 42i8; + + let y = f(&x); + let z = *y; + + assert!(z == x); +} + +// returning references (back, not from locals) +fn f(x:&i8) -> &i8 { + g(x) +} +fn g(x:&i8) -> &i8 { + x +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json new file mode 100644 index 000000000..15fb2e973 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json @@ -0,0 +1,2023 @@ +{ + "name": "refReturned", + "crate_id": 12856577191041417260, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 122, + 32, + 61, + 61, + 32, + 120 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 25, + { + "NormalSym": "_ZN11refReturned1f17hec238a45891f1867E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE" + } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 31, + { + "NormalSym": "_ZN11refReturned1g17h1f19f83ec6e6cf29E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E" + } + ], + [ + 32, + { + "NoOpSym": "" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned4main17haf3da80612a1db31E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 57 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 60, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 2, + "span": 61, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 57, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 59, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 60, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 61, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 62 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned1f17hec238a45891f1867E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 28, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 67, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 67, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 68 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h54c9713c41194453E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h83aba63269f07e81E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned1g17h1f19f83ec6e6cf29E", + "mono_item_kind": { + "MonoItemFn": { + "name": "g", + "id": 8, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "span": 70 + } + ], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 28, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 72, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h2966f97234df1366E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 29, + { + "RigidTy": "Bool" + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state new file mode 100644 index 000000000..8ffbb7679 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -0,0 +1,66 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( -1 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionUnreachable + + + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + + + + .List + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 29 ) |-> rigidTyBool + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.rs b/kmir/src/tests/integration/data/exec-smir/references/simple.rs new file mode 100644 index 000000000..7b6223a5d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.rs @@ -0,0 +1,7 @@ +fn main() { + let x = 42i8; + let y = &x; + let z = *y; + + assert!(z == x); +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json new file mode 100644 index 000000000..d0219c989 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json @@ -0,0 +1,1805 @@ +{ + "name": "simple", + "crate_id": 3679779564793363023, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 122, + 32, + 61, + 61, + 32, + 120 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E" + } + ], + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 25, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0e8fcda8fbc4c3b7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN6simple4main17hcc17a5a2c5cebe39E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 + } + } + } + } + ] + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 50 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 50 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 10 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 55 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 57, + "mutability": "Not" + }, + { + "ty": 27, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 55, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 57, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hc7c2da63cbb13d2eE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8b592859fcbe523aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 28, + { + "RigidTy": "Bool" + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.state b/kmir/src/tests/integration/data/exec-smir/references/simple.state new file mode 100644 index 000000000..8fcbeaeb2 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -0,0 +1,62 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( -1 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionUnreachable + + + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + + + + .List + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 28 ) |-> rigidTyBool + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.rs b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.rs new file mode 100644 index 000000000..d80bfca26 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.rs @@ -0,0 +1,43 @@ +#[derive(Debug)] +struct MyStruct { + a_value: i8, + another: bool, + a_third: usize, +} + +#[derive(Debug)] +struct Enclosing<'a> { + inner: &'a mut MyStruct +} + +fn main () { + + let mut a = MyStruct { a_value: 32, another: false, a_third: 32}; + + // mutate field through ref and double-ref + let r1 = &mut (a.a_value); + *r1 = 42; + assert!(a.a_value == 42); + let mut r1 = &mut (a.a_value); + let r2 = &mut r1; + **r2 = 43; + assert!(a.a_value == 43); + + // create reference-field chain + let mut e = Enclosing{inner: &mut a}; + let ee = &mut e; + + // read and write values through chain of ref/field projections + let vv = (*(*ee).inner).a_value; + assert!(vv == 43); + + (*(*ee).inner).another = true; + + let r3 = &mut (*ee).inner.a_third; + *r3 = (*(*ee).inner).a_value as usize; + + assert!(a.another); + assert!(a.a_third == 43); + +} + diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json new file mode 100644 index 000000000..742906ea4 --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json @@ -0,0 +1,3196 @@ +{ + "name": "weirdRefs", + "crate_id": 16077360951361859512, + "allocs": [ + [ + 9, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 97, + 46, + 97, + 95, + 116, + 104, + 105, + 114, + 100, + 32, + 61, + 61, + 32, + 52, + 51 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 7, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 118, + 118, + 32, + 61, + 61, + 32, + 52, + 51 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 6, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 97, + 46, + 97, + 95, + 118, + 97, + 108, + 117, + 101, + 32, + 61, + 61, + 32, + 52, + 51 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 5, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 97, + 46, + 97, + 95, + 118, + 97, + 108, + 117, + 101, + 32, + 61, + 61, + 32, + 52, + 50 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 8, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 97, + 46, + 97, + 110, + 111, + 116, + 104, + 101, + 114 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hc0aa0378580334c9E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 44, + { + "NoOpSym": "" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ea78c58d6db9c2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN9weirdRefs4main17hc23c1f8cda602dfeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 + } + } + }, + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 10 + } + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + ] + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + ] + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 12 + } + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 42, + 1 + ] + ], + "otherwise": 2 + } + } + }, + "span": 50 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + ] + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 5, + "projection": [] + } + ] + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [] + }, + { + "CopyForDeref": { + "local": 6, + "projection": [ + "Deref" + ] + } + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 43 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 + } + } + } + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 3 + ] + ], + "otherwise": 4 + } + } + }, + "span": 59 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 65, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 15 + } + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 65 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 67 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 8, + 0, + [ + { + "Lifetime": { + "kind": "ReErased" + } + } + ], + null, + null + ] + }, + [ + { + "Copy": { + "local": 10, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 68 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 9, + "projection": [] + } + ] + } + ] + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 21, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } + ] + } + } + ] + }, + "span": 70 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 21, + "projection": [ + "Deref", + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 70 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 12, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 5 + ] + ], + "otherwise": 6 + } + } + }, + "span": 66 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 71, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 16 + } + } + } + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 71 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 22, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } + ] + } + } + ] + }, + "span": 73 + }, + { + "kind": { + "Assign": [ + { + "local": 22, + "projection": [ + "Deref", + { + "Field": [ + 1, + 25 + ] + } + ] + }, + { + "Use": { + "Constant": { + "span": 74, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 17 + } + } + } + } + ] + }, + "span": 73 + }, + { + "kind": { + "Assign": [ + { + "local": 23, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } + ] + } + } + ] + }, + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 23, + "projection": [ + "Deref", + { + "Field": [ + 2, + 26 + ] + } + ] + } + ] + } + ] + }, + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 24, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } + ] + } + } + ] + }, + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 24, + "projection": [ + "Deref", + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [ + "Deref" + ] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 15, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 77 + }, + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 16, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 8 + ] + ], + "otherwise": 7 + } + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 2 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 18 + } + } + } + ], + "destination": { + "local": 13, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 78 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 18, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 26 + ] + } + ] + } + } + } + ] + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 18, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 9 + ] + ], + "otherwise": 10 + } + } + }, + "span": 79 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 81, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 3 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 19 + } + } + } + ], + "destination": { + "local": 17, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 81 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 82 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 4 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 20 + } + } + } + ], + "destination": { + "local": 19, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 83 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 85, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 86, + "mutability": "Not" + }, + { + "ty": 2, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 87, + "mutability": "Mut" + }, + { + "ty": 33, + "span": 88, + "mutability": "Not" + }, + { + "ty": 2, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 34, + "span": 89, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 67, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 90, + "mutability": "Not" + }, + { + "ty": 2, + "span": 91, + "mutability": "Not" + }, + { + "ty": 32, + "span": 78, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 92, + "mutability": "Not" + }, + { + "ty": 2, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 85, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "r1", + "source_info": { + "span": 86, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "r1", + "source_info": { + "span": 87, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "r2", + "source_info": { + "span": 88, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 89, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "ee", + "source_info": { + "span": 90, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "vv", + "source_info": { + "span": 91, + "scope": 7 + }, + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "r3", + "source_info": { + "span": 92, + "scope": 8 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 93 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hb6fe3c4fa2c52486E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hc0aa0378580334c9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h65a2c197bce21f15E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Uint": "Usize" + } + } + ], + [ + 25, + { + "RigidTy": "Bool" + } + ], + [ + 41, + { + "RigidTy": { + "Uint": "U32" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state new file mode 100644 index 000000000..5b683d8de --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -0,0 +1,94 @@ + + + #EndProgram ~> .K + + + noReturn + + + ty ( -1 ) + + + + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) ) + ListItem ( basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) ) + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( -1 ) , projection: .ProjectionElems ) + + + noBasicBlockIdx + + + unwindActionUnreachable + + + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 43 , 64 , false ) , ty ( 26 ) , mutabilityMut ) ) ) , ty ( 30 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 33 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) ) , ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 36 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( Moved ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + + + + .List + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) .Bodies ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 25 ) |-> rigidTyBool + ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) + ty ( 41 ) |-> rigidTyUint ( uintTyU32 ) + + + diff --git a/kmir/src/tests/integration/test_integration.py b/kmir/src/tests/integration/test_integration.py index 329645806..fcdd5f910 100644 --- a/kmir/src/tests/integration/test_integration.py +++ b/kmir/src/tests/integration/test_integration.py @@ -11,13 +11,13 @@ from kmir.__main__ import GenSpecOpts, ProveRunOpts, _kmir_gen_spec, _kmir_prove_run from kmir.build import haskell_semantics, llvm_semantics -from kmir.convert_from_definition.v2parser import Parser +from kmir.parse.parser import Parser if TYPE_CHECKING: from pyk.kast.inner import KInner - from kmir.convert_from_definition.v2parser import JSON from kmir.kmir import KMIR + from kmir.parse.parser import JSON from kmir.tools import Tools @@ -264,6 +264,48 @@ def test_schema_kapply_parse( EXEC_DATA_DIR / 'arithmetic' / 'unary.state', None, ), + ( + 'Ref-simple', + EXEC_DATA_DIR / 'references' / 'simple.smir.json', + EXEC_DATA_DIR / 'references' / 'simple.state', + None, + ), + ( + 'Ref-refAsArg', + EXEC_DATA_DIR / 'references' / 'refAsArg.smir.json', + EXEC_DATA_DIR / 'references' / 'refAsArg.state', + None, + ), + ( + 'Ref-refAsArg2', + EXEC_DATA_DIR / 'references' / 'refAsArg2.smir.json', + EXEC_DATA_DIR / 'references' / 'refAsArg2.state', + 999, + ), + ( + 'Ref-refReturned', + EXEC_DATA_DIR / 'references' / 'refReturned.smir.json', + EXEC_DATA_DIR / 'references' / 'refReturned.state', + 999, + ), + ( + 'Ref-doubleRef', + EXEC_DATA_DIR / 'references' / 'doubleRef.smir.json', + EXEC_DATA_DIR / 'references' / 'doubleRef.state', + None, + ), + ( + 'Ref-mutableRef', + EXEC_DATA_DIR / 'references' / 'mutableRef.smir.json', + EXEC_DATA_DIR / 'references' / 'mutableRef.state', + 999, + ), + ( + 'Ref-weirdRefs', + EXEC_DATA_DIR / 'references' / 'weirdRefs.smir.json', + EXEC_DATA_DIR / 'references' / 'weirdRefs.state', + None, + ), ] diff --git a/package/version b/package/version index 6db5fd3e7..d48d6aef8 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.93 +0.3.94 diff --git a/rust-verification-proofs/maximum-proof/README.md b/rust-verification-proofs/maximum-proof/README.md index 425e9b7b4..8856fe01c 100644 --- a/rust-verification-proofs/maximum-proof/README.md +++ b/rust-verification-proofs/maximum-proof/README.md @@ -6,7 +6,7 @@ fn main() { let a:usize = 42; - let b:usize = -43; + let b:usize = 22; let c:usize = 0; let result = maximum(a, b, c); @@ -33,7 +33,7 @@ In a future version, we will be able to start directly with the `maximum` functi ## Extracting Stable MIR for the program -Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. +Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. (Run the below commmands from the `mir-semantics/rust-verification-proofs/maximum-proof/` directory). ```shell cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs @@ -44,12 +44,13 @@ The Stable MIR for the program can also be rendered as a graph, using the `--dot cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs ``` ## Constructing the claim by executing `main` to certain points +Through concrete execution of the parsed K program we can interrupt the execution after a given number of rewrite steps to inspect the intermediate state. This will help us with writing our claim manually until the process is automated. 1. The program (`main`) reaches the call to `maximum` after 22 steps. The following command runs it and displays the resulting program state. ```shell - maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S + poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S ``` - Arguments `a`, `b`, and `c` are initialised to `Integer`s as `locals[1]` to `locals[3]` - A `call` terminator calling function `ty(25)` is executed next (front of the `k` cell) @@ -59,7 +60,7 @@ cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codeg The following command runs it and displays the resulting program state. ```shell - maximum-proof$ poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S + poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S ``` - The value `locals[0]` is now set to an `Integer`. This will be the target of our assertions. - A `return` terminator is executed next (front of the `k` cell), it will return `locals[0]` @@ -85,6 +86,7 @@ Most of the syntax can be copied from the output of the `kmir run` commands abov Alternatively, it is possible to construct a claim that the entire rest of the program after initialising the variables will result in the desired `?RESULT`, i.e., the assertion in `main` is executed successfully and the program ends in `#EndProgram` after checking it. This would require more steps. ## Running the prover on the claim and viewing the proof +Now that we have constructed claim, we can run use the KMIR verifier to perform symbollic execution, and can view the state of proof through the KMIR proof viewer. ```shell poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof ``` diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs index 25d54c526..448c2cb9d 100644 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs @@ -1,9 +1,9 @@ fn main() { - let a:isize = 42; - let b:isize = -43; - let c:isize = 0; + let a:usize = 42; + let b:usize = 22; + let c:usize = 0; let result = maximum(a, b, c); @@ -11,7 +11,7 @@ fn main() { && (result == a || result == b || result == c ) ); } -fn maximum(a: isize, b: isize, c: isize) -> isize { +fn maximum(a: usize, b: usize, c: usize) -> usize { // max(a, max(b, c)) let max_ab = if a < b {b} else {a}; if max_ab < c {c} else {max_ab} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot index d6a136c47..6da5f7ff3 100644 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot @@ -1,135 +1,135 @@ digraph { label="main_max_with_lt"; node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; subgraph cluster_0 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - Xb022926f55be7915_0 -> Xb022926f55be7915_1 [label="_3"]; - Xb022926f55be7915_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - Xb022926f55be7915_1 -> Xb022926f55be7915_2 [label="_2"]; - Xb022926f55be7915_1 [label="Storage Dead _4\lCall\l"]; - Xb022926f55be7915_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - Xb022926f55be7915_0 -> X86cc23a99438eb2_0 [label="_4"]; - Xb022926f55be7915_1 -> X20f17eb946604891_0 [label="_3"]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X20f17eb946604891_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_3 [label="Cleanup"]; - Xda86ab50b6674bf3_0 -> Xda86ab50b6674bf3_1 [label="_0"]; - Xda86ab50b6674bf3_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xda86ab50b6674bf3_1 -> Xda86ab50b6674bf3_2; - Xda86ab50b6674bf3_1 [label="Drop _1\l"]; - Xda86ab50b6674bf3_2 [label="Return\l"]; - Xda86ab50b6674bf3_3 -> Xda86ab50b6674bf3_4; - Xda86ab50b6674bf3_3 [label="Drop _1\l"]; - Xda86ab50b6674bf3_4 [label="Resume\l"]; - } - Xda86ab50b6674bf3_0 -> Xb022926f55be7915_0 [label="_3,_2"]; - subgraph cluster_3 { label="main"; style="filled"; color=palegreen; - X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="_4"]; - X37252ea5c5b3ce2a_0 [label="_1 <- Use(const :: isize)\l_2 <- Use(const :: isize)\l_3 <- Use(const :: isize)\lCall\l"]; + X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="4"]; + X37252ea5c5b3ce2a_0 [label="1 <- Use(const :: usize)\l2 <- Use(const :: usize)\l3 <- Use(const :: usize)\lCall\l"]; X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; - X37252ea5c5b3ce2a_1 [label="_5 <- Ge(_4, _1)\lSwitchInt _5\l"]; + X37252ea5c5b3ce2a_1 [label="5 <- Ge(cp(4), cp(1))\lSwitchInt mv(5)\l"]; X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; - X37252ea5c5b3ce2a_2 [label="_6 <- Ge(_4, _2)\lSwitchInt _6\l"]; + X37252ea5c5b3ce2a_2 [label="6 <- Ge(cp(4), cp(2))\lSwitchInt mv(6)\l"]; X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; - X37252ea5c5b3ce2a_3 [label="_7 <- Ge(_4, _3)\lSwitchInt _7\l"]; + X37252ea5c5b3ce2a_3 [label="7 <- Ge(cp(4), cp(3))\lSwitchInt mv(7)\l"]; X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_4 [label="_8 <- Eq(_4, _1)\lSwitchInt _8\l"]; + X37252ea5c5b3ce2a_4 [label="8 <- Eq(cp(4), cp(1))\lSwitchInt mv(8)\l"]; X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_5 [label="_9 <- Eq(_4, _2)\lSwitchInt _9\l"]; + X37252ea5c5b3ce2a_5 [label="9 <- Eq(cp(4), cp(2))\lSwitchInt mv(9)\l"]; X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_6 [label="_10 <- Eq(_4, _3)\lSwitchInt _10\l"]; + X37252ea5c5b3ce2a_6 [label="10 <- Eq(cp(4), cp(3))\lSwitchInt mv(10)\l"]; X37252ea5c5b3ce2a_7 [label="Call\l"]; X37252ea5c5b3ce2a_8 [label="Return\l"]; } - X37252ea5c5b3ce2a_0 -> X527779074a5fd21e_0 [label="_1,_2,_3"]; - X37252ea5c5b3ce2a_7 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_4 { + X37252ea5c5b3ce2a_0 -> X9585eeb1b7d3a83d_0 [label="cp(1),cp(2),cp(3)"]; + X37252ea5c5b3ce2a_7 -> Xac08878333d72e42_0 [label="const :: &str"]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X5c233e009f84aa6c_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; style="filled"; color=lightgray; - X86cc23a99438eb2_0 -> X86cc23a99438eb2_1 [label="_0"]; - X86cc23a99438eb2_0 [label="Call\l"]; - X86cc23a99438eb2_1 -> X86cc23a99438eb2_2 [label="_2"]; - X86cc23a99438eb2_1 [label="Call\l"]; - X86cc23a99438eb2_2 [label="Return\l"]; + X83f8b52e3f0ef4c5_0 -> X83f8b52e3f0ef4c5_1 [label="0"]; + X83f8b52e3f0ef4c5_0 [label="Call\l"]; + X83f8b52e3f0ef4c5_1 -> X83f8b52e3f0ef4c5_2 [label="2"]; + X83f8b52e3f0ef4c5_1 [label="Call\l"]; + X83f8b52e3f0ef4c5_2 [label="Return\l"]; } - X86cc23a99438eb2_0 -> X2a67ec2487cf8e32_0 [label="_1,const :: ()"]; - X86cc23a99438eb2_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + X83f8b52e3f0ef4c5_0 -> X5153bc83e282e268_0 [label="mv(1),const :: ()"]; + X83f8b52e3f0ef4c5_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_3 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X88af70ac7219a434_0 -> X88af70ac7219a434_1 [label="5"]; + X88af70ac7219a434_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + X88af70ac7219a434_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X88af70ac7219a434_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_4 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X2aeea2bef42114da_0 -> X2aeea2bef42114da_1 [label="0"]; + X2aeea2bef42114da_0 [label="Call\l"]; + X2aeea2bef42114da_1 [label="Return\l"]; + } + X2aeea2bef42114da_0 -> X58ae416f9afa06ac_0 [label="mv(*1),mv(2)"]; subgraph cluster_5 { - label="maximum"; + label=">::ca\nll_once"; style="filled"; - color=palegreen; - X527779074a5fd21e_0 -> X527779074a5fd21e_2 [label="0"]; - X527779074a5fd21e_0 -> X527779074a5fd21e_1 [label="other"]; - X527779074a5fd21e_0 [label="_5 <- Lt(_1, _2)\lSwitchInt _5\l"]; - X527779074a5fd21e_1 -> X527779074a5fd21e_3; - X527779074a5fd21e_1 [label="_4 <- Use(_2)\lGoto\l"]; - X527779074a5fd21e_2 -> X527779074a5fd21e_3; - X527779074a5fd21e_2 [label="_4 <- Use(_1)\lGoto\l"]; - X527779074a5fd21e_3 -> X527779074a5fd21e_5 [label="0"]; - X527779074a5fd21e_3 -> X527779074a5fd21e_4 [label="other"]; - X527779074a5fd21e_3 [label="_7 <- Use(_4)\l_6 <- Lt(_7, _3)\lSwitchInt _6\l"]; - X527779074a5fd21e_4 -> X527779074a5fd21e_6; - X527779074a5fd21e_4 [label="_0 <- Use(_3)\lGoto\l"]; - X527779074a5fd21e_5 -> X527779074a5fd21e_6; - X527779074a5fd21e_5 [label="_0 <- Use(_4)\lGoto\l"]; - X527779074a5fd21e_6 [label="Return\l"]; + color=lightgray; + X5153bc83e282e268_0 -> X5153bc83e282e268_1 [label="0"]; + X5153bc83e282e268_0 [label="Call\l"]; + X5153bc83e282e268_1 [label="Return\l"]; } + X5153bc83e282e268_0 -> X5153bc83e282e268_0: 1 [label=""]; subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + label="std::rt::lang_start::<()>\n::{closure#0}"; style="filled"; color=lightgray; - X34679ac96970715e_0 -> X34679ac96970715e_1 [label="_0"]; - X34679ac96970715e_0 [label="Call\l"]; - X34679ac96970715e_1 [label="Return\l"]; + Xf1c2e3e2362b71b1_0 -> Xf1c2e3e2362b71b1_1 [label="3"]; + Xf1c2e3e2362b71b1_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; + Xf1c2e3e2362b71b1_1 -> Xf1c2e3e2362b71b1_2 [label="2"]; + Xf1c2e3e2362b71b1_1 [label="Storage Dead _4\lCall\l"]; + Xf1c2e3e2362b71b1_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; } - X34679ac96970715e_0 -> Xda86ab50b6674bf3_0 [label="_1*,_2"]; + Xf1c2e3e2362b71b1_0 -> X83f8b52e3f0ef4c5_0 [label="mv(4)"]; + Xf1c2e3e2362b71b1_1 -> X5c233e009f84aa6c_0 [label="mv(3)"]; subgraph cluster_7 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + label="maximum"; style="filled"; - color=lightgray; - Xb149796b83f1b2e4_0 [label="Return\l"]; + color=palegreen; + X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_2 [label="0"]; + X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_1 [label="other"]; + X9585eeb1b7d3a83d_0 [label="5 <- Lt(cp(1), cp(2))\lSwitchInt mv(5)\l"]; + X9585eeb1b7d3a83d_1 -> X9585eeb1b7d3a83d_3; + X9585eeb1b7d3a83d_1 [label="4 <- Use(cp(2))\lGoto\l"]; + X9585eeb1b7d3a83d_2 -> X9585eeb1b7d3a83d_3; + X9585eeb1b7d3a83d_2 [label="4 <- Use(cp(1))\lGoto\l"]; + X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_5 [label="0"]; + X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_4 [label="other"]; + X9585eeb1b7d3a83d_3 [label="7 <- Use(cp(4))\l6 <- Lt(mv(7), cp(3))\lSwitchInt mv(6)\l"]; + X9585eeb1b7d3a83d_4 -> X9585eeb1b7d3a83d_6; + X9585eeb1b7d3a83d_4 [label="0 <- Use(cp(3))\lGoto\l"]; + X9585eeb1b7d3a83d_5 -> X9585eeb1b7d3a83d_6; + X9585eeb1b7d3a83d_5 [label="0 <- Use(cp(4))\lGoto\l"]; + X9585eeb1b7d3a83d_6 [label="Return\l"]; } subgraph cluster_8 { - label="std::rt::lang_start::<()>"; + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; style="filled"; color=lightgray; - Xc8323e8e5ef1862e_0 -> Xc8323e8e5ef1862e_1 [label="_5"]; - Xc8323e8e5ef1862e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - Xc8323e8e5ef1862e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_3 [label="Cleanup"]; + X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_1 [label="0"]; + X58ae416f9afa06ac_0 [label="3 <- &mut 1\lCall\l"]; + X58ae416f9afa06ac_1 -> X58ae416f9afa06ac_2; + X58ae416f9afa06ac_1 [label="Drop 1\l"]; + X58ae416f9afa06ac_2 [label="Return\l"]; + X58ae416f9afa06ac_3 -> X58ae416f9afa06ac_4; + X58ae416f9afa06ac_3 [label="Drop 1\l"]; + X58ae416f9afa06ac_4 [label="Resume\l"]; } - Xc8323e8e5ef1862e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + X58ae416f9afa06ac_0 -> Xf1c2e3e2362b71b1_0 [label="mv(3),mv(2)"]; subgraph cluster_9 { - label=">::ca\nll_once"; + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; style="filled"; color=lightgray; - X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_1 [label="_0"]; - X2a67ec2487cf8e32_0 [label="Call\l"]; - X2a67ec2487cf8e32_1 [label="Return\l"]; + Xefb68cd7a0d5be14_0 [label="Return\l"]; } - X2a67ec2487cf8e32_0 -> X2a67ec2487cf8e32_0: _1 [label=""]; } diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json index 847684ef6..07869653d 100644 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json @@ -1 +1,2696 @@ -{"name":"main_max_with_lt","crate_id":5373935543796547206,"allocs":[[1,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,114,101,115,117,108,116,32,62,61,32,97,32,38,38,32,114,101,115,117,108,116,32,62,61,32,98,32,38,38,32,114,101,115,117,108,116,32,62,61,32,99,32,38,38,10,32,32,32,32,40,114,101,115,117,108,116,32,61,61,32,97,32,124,124,32,114,101,115,117,108,116,32,61,61,32,98,32,124,124,32,114,101,115,117,108,116,32,61,61,32,99,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E"}],[26,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[30,{"NoOpSym":""}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE"}],[25,{"NormalSym":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN16main_max_with_lt7maximum17hb1ae0b0cce2762eaE","mono_item_kind":{"MonoItemFn":{"name":"maximum","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":69}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":69}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[]}}}]},"span":71}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[]}}}]},"span":72}],"terminator":{"kind":{"Goto":{"target":3}},"span":70}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":74},{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":7,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":73}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":4}}},"span":73}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":3,"projection":[]}}}]},"span":76}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":4,"projection":[]}}}]},"span":77}],"terminator":{"kind":{"Goto":{"target":6}},"span":75}},{"statements":[],"terminator":{"kind":"Return","span":78}}],"locals":[{"ty":6,"span":79,"mutability":"Mut"},{"ty":6,"span":80,"mutability":"Not"},{"ty":6,"span":81,"mutability":"Not"},{"ty":6,"span":82,"mutability":"Not"},{"ty":6,"span":83,"mutability":"Not"},{"ty":28,"span":69,"mutability":"Mut"},{"ty":28,"span":73,"mutability":"Mut"},{"ty":6,"span":74,"mutability":"Mut"}],"arg_count":3,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":81,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"c","source_info":{"span":82,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"max_ab","source_info":{"span":83,"scope":1},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":84}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h61da48661c51352eE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hc7b85bf43539b1a6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN16main_max_with_lt4main17h96bac61ef98236a2E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":10}}}}]},"span":52},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":53,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255,255,255,255,255,255,255],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":11}}}}]},"span":53},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":6,"id":12}}}}]},"span":54}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}},{"Copy":{"local":3,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":1,"unwind":"Continue"}},"span":51}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":5,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":2}}},"span":55}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":6,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":3}}},"span":56}},{"statements":[{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Ge",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":57}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":4}}},"span":57}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":1,"projection":[]}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":8,"projection":[]}},"targets":{"branches":[[0,5]],"otherwise":8}}},"span":58}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":59}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":9,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":8}}},"span":59}},{"statements":[{"kind":{"Assign":[{"local":10,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":4,"projection":[]}},{"Copy":{"local":3,"projection":[]}}]}]},"span":60}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":10,"projection":[]}},"targets":{"branches":[[0,7]],"otherwise":8}}},"span":60}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":61,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":13}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":27,"id":14}}}],"destination":{"local":11,"projection":[]},"target":null,"unwind":"Continue"}},"span":61}},{"statements":[],"terminator":{"kind":"Return","span":62}}],"locals":[{"ty":1,"span":63,"mutability":"Mut"},{"ty":6,"span":64,"mutability":"Not"},{"ty":6,"span":65,"mutability":"Not"},{"ty":6,"span":66,"mutability":"Not"},{"ty":6,"span":67,"mutability":"Not"},{"ty":28,"span":55,"mutability":"Mut"},{"ty":28,"span":56,"mutability":"Mut"},{"ty":28,"span":57,"mutability":"Mut"},{"ty":28,"span":58,"mutability":"Mut"},{"ty":28,"span":59,"mutability":"Mut"},{"ty":28,"span":60,"mutability":"Mut"},{"ty":29,"span":61,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":64,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":65,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":66,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":67,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17he1705726abca17eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h75d6eb6cbba797d2E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h4e74b2039a8d15adE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9f5920ae7e3e7e54E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h563c9dfa7d67f6e6E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5364b7b343208af1E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[28,{"RigidTy":"Bool"}]],"debug":null} \ No newline at end of file +{ + "name": "main_max_with_lt", + "crate_id": 5373935543796547206, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 97, + 32, + 38, + 38, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 98, + 32, + 38, + 38, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 99, + 32, + 38, + 38, + 10, + 32, + 32, + 32, + 32, + 40, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 97, + 32, + 124, + 124, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 98, + 32, + 124, + 124, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 99, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 25, + { + "NormalSym": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 33, + { + "NoOpSym": "" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h8f98b99a20edb596E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E", + "mono_item_kind": { + "MonoItemFn": { + "name": "maximum", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 69 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "span": 71 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 70 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 70 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 7, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 73 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 + } + } + }, + "span": 73 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 3, + "projection": [] + } + } + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 75 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 77 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 75 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 + } + } + ], + "locals": [ + { + "ty": 26, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 80, + "mutability": "Not" + }, + { + "ty": 26, + "span": 81, + "mutability": "Not" + }, + { + "ty": 26, + "span": 82, + "mutability": "Not" + }, + { + "ty": 26, + "span": 83, + "mutability": "Not" + }, + { + "ty": 29, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 74, + "mutability": "Mut" + } + ], + "arg_count": 3, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 80, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "c", + "source_info": { + "span": 82, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "max_ab", + "source_info": { + "span": 83, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 22, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 12 + } + } + } + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 2 + } + } + }, + "span": 55 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 3 + } + } + }, + "span": 56 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 57 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 4 + } + } + }, + "span": 57 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 8, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 8 + } + } + }, + "span": 58 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 59 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 9, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 8 + } + } + }, + "span": 59 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 60 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 10, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 8 + } + } + }, + "span": 60 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 13 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 14 + } + } + } + ], + "destination": { + "local": 11, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 64, + "mutability": "Not" + }, + { + "ty": 26, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 66, + "mutability": "Not" + }, + { + "ty": 26, + "span": 67, + "mutability": "Not" + }, + { + "ty": 29, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 59, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 61, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 64, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 65, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 66, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 67, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hd99c80c4d0898bdeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h739869090782dad0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 29, + { + "RigidTy": "Bool" + } + ], + [ + 26, + { + "RigidTy": { + "Uint": "Usize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/maximum-proof/maximum-spec.k b/rust-verification-proofs/maximum-proof/maximum-spec.k index 4474fac6e..97f8a00ce 100644 --- a/rust-verification-proofs/maximum-proof/maximum-spec.k +++ b/rust-verification-proofs/maximum-proof/maximum-spec.k @@ -47,19 +47,18 @@ module MAXIMUM-SPEC _ => ?_ ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 64 , false ) , ty ( 6 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 64 , false ) , ty ( 6 ) , _ ) ) - ListItem ( typedLocal ( Integer ( C , 64 , false ) , ty ( 6 ) , _ ) ) + ListItem ( typedLocal ( Integer ( A , 64 , false ) , ty ( 26 ) , _ ) ) + ListItem ( typedLocal ( Integer ( B , 64 , false ) , ty ( 26 ) , _ ) ) + ListItem ( typedLocal ( Integer ( C , 64 , false ) , ty ( 26 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 64, false), ty ( 6 ) , ?_ )) + ListItem ( typedLocal ( Integer ( ?RESULT, 64, false), ty ( 26 ) , ?_ )) ?_ _ => ?_ - (ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 6 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 6 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 6 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) - ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) requires // invariant of the `Integer` constructor From 9aa797585647bfc2aa4053acd115a6920479bfa1 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Thu, 27 Mar 2025 12:33:47 -0300 Subject: [PATCH 17/84] Merging master into branch (#512) Co-authored-by: Daniel Cumming <124537596+dkcumming@users.noreply.github.com> Co-authored-by: devops Co-authored-by: Jost Berthold --- README.md | 15 +- deps/stable-mir-json | 2 +- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- kmir/src/kmir/kdist/mir-semantics/body.md | 6 +- kmir/src/kmir/kdist/mir-semantics/kmir.md | 108 +- .../kdist/mir-semantics/lemmas/kmir-lemmas.md | 2 - kmir/src/kmir/kdist/mir-semantics/mono.md | 2 +- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 626 +- kmir/src/kmir/parse/notes.md | 2 +- kmir/src/kmir/parse/parser.py | 2 +- .../arithmetic-unchecked-runs.smir.json | 7194 ++++++++--------- .../arithmetic-unchecked-runs.state | 48 +- .../exec-smir/arithmetic/arithmetic.smir.json | 5434 +++++++------ .../exec-smir/arithmetic/arithmetic.state | 54 +- .../data/exec-smir/arithmetic/unary.smir.json | 3770 +++++---- .../data/exec-smir/arithmetic/unary.state | 26 +- .../assign-cast/assign-cast.smir.json | 2162 ++++- .../exec-smir/assign-cast/assign-cast.state | 44 +- .../call-with-args/main-a-b-with-int.23.state | 28 +- .../call-with-args/main-a-b-with-int.27.state | 62 + .../main-a-b-with-int.smir.json | 3378 ++++---- .../exec-smir/main-a-b-c/main-a-b-c.19.state | 26 +- .../exec-smir/main-a-b-c/main-a-b-c.run.state | 20 +- .../exec-smir/main-a-b-c/main-a-b-c.smir.json | 1660 +++- .../exec-smir/references/doubleRef.smir.json | 4450 +++++----- .../data/exec-smir/references/doubleRef.state | 36 +- .../exec-smir/references/mutableRef.smir.json | 3430 ++++---- .../exec-smir/references/mutableRef.state | 31 +- .../exec-smir/references/refAsArg.smir.json | 3114 ++++--- .../data/exec-smir/references/refAsArg.state | 24 +- .../exec-smir/references/refAsArg2.smir.json | 3190 ++++---- .../data/exec-smir/references/refAsArg2.state | 26 +- .../references/refReturned.smir.json | 3334 ++++---- .../exec-smir/references/refReturned.state | 28 +- .../exec-smir/references/simple.smir.json | 2936 ++++--- .../data/exec-smir/references/simple.state | 22 +- .../exec-smir/references/weirdRefs.smir.json | 5038 ++++++------ .../data/exec-smir/references/weirdRefs.state | 59 +- .../struct_field_update.smir.json | 1896 ++++- .../structs-tuples/struct_field_update.state | 24 +- .../structs-tuples/structs-tuples.84.state | 46 +- .../structs-tuples/structs-tuples.90.state | 75 + .../structs-tuples/structs-tuples.smir.json | 4112 +++++----- .../data/proving/unchecked-add-spec.k | 75 + .../data/schema-parse/monoitem/input.json | 619 ++ .../data/schema-parse/monoitem/reference.kmir | 12 + .../data/schema-parse/monoitem/reference.sort | 1 + .../src/tests/integration/test_integration.py | 31 +- package/version | 2 +- 50 files changed, 31828 insertions(+), 25458 deletions(-) create mode 100644 kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state create mode 100644 kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state create mode 100644 kmir/src/tests/integration/data/proving/unchecked-add-spec.k create mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/input.json create mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/reference.kmir create mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/reference.sort diff --git a/README.md b/README.md index 7e3e7eb78..e9312659b 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ If you would like to try a legacy version of the project, [this blog post](https ## For Developers -### Setup +### KMIR Setup -Pre-requisites: `python >= 3.10`, `pip >= 20.0.2`, `poetry >= 1.3.2`. +Pre-requisites: `python >= 3.10`, `pip >= 20.0.2`, `poetry >= 1.3.2`, `gcc >= 11.4.0`, `cargo == nightly-2024-11-29`, `k >= v7.1.205`. To install K, follow the steps available in [K's Quick Start instructions](https://github.com/runtimeverification/k?tab=readme-ov-file#quick-start). ```bash make build @@ -23,6 +23,17 @@ Use `make` to run common tasks (see the [Makefile](Makefile) for a complete list For interactive use, spawn a shell with `poetry -C kmir/ shell` (after `poetry -C kmir/ install`), then run an interpreter. Or directly run from `mir-semantics` root with `poetry run -C kmir kmir ` +### Stable-MIR-JSON Setup + +At the moment, to interact with some of KMIR functionalities, it is necessary to provide the tool with a serialized JSON of a Rust program's Stable MIR. To be able to extract these serialized SMIR JSONs, you can use the `Stable-MIR-JSON` tool, setting it up with the following commands: + +```Rust +git submodule update --init --recursive +make stable-mir-json +``` + +For more information on testing, installation, and general usage of this tool, please check [Stable-MIR-JSON's repository](https://github.com/runtimeverification/stable-mir-json/). + ## Usage Use `--help` with each command for more details. diff --git a/deps/stable-mir-json b/deps/stable-mir-json index fbdfe361d..463282e2c 160000 --- a/deps/stable-mir-json +++ b/deps/stable-mir-json @@ -1 +1 @@ -Subproject commit fbdfe361d79a7d125d4ff70fb7c7b354eee483ee +Subproject commit 463282e2c3abba3db87323c29df19d24c3363dfb diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 7e487ea32..fb8df5298 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.103" +version = "0.3.107" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index cfdb78e48..e69cf1174 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.103' +VERSION: Final = '0.3.107' diff --git a/kmir/src/kmir/kdist/mir-semantics/body.md b/kmir/src/kmir/kdist/mir-semantics/body.md index 4a175b6ec..32f13531e 100644 --- a/kmir/src/kmir/kdist/mir-semantics/body.md +++ b/kmir/src/kmir/kdist/mir-semantics/body.md @@ -5,7 +5,7 @@ requires "ty.md" module BODY-SORTS syntax Body -syntax Bodies +syntax MaybeBody syntax DefId syntax MaybeInt syntax MIRBool @@ -355,10 +355,10 @@ syntax VarDebugInfo ::= varDebugInfo(name: Symbol, sourceInfo: SourceInfo, compo syntax VarDebugInfos ::= List {VarDebugInfo, ""} [group(mir-list), symbol(VarDebugInfos::append), terminator-symbol(VarDebugInfos::empty)] +syntax MaybeBody ::= someBody(Body) [group(mir-option)] + | "noBody" [group(mir-option)] syntax Body ::= body(blocks: BasicBlocks, locals: LocalDecls, argCount: MIRInt, varDebugInfo: VarDebugInfos, spreadArg: MaybeLocal, span: Span) [group(mir---blocks--locals--arg-count--var-debug-info--spread-arg--span)] -syntax Bodies ::= List {Body, ""} - [group(mir-list), symbol(Bodies::append), terminator-symbol(Bodies::empty)] endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index dcf29818e..d7886dac8 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -219,7 +219,7 @@ be known to populate the `currentFunc` field. rule #execFunction( monoItem( SYMNAME, - monoItemFn(_, _, body((FIRST:BasicBlock _) #as BLOCKS,LOCALS, _, _, _, _) .Bodies) + monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS,LOCALS, _, _, _, _))) ), FUNCTIONNAMES ) @@ -259,7 +259,7 @@ be known to populate the `currentFunc` field. rule #reserveFor(localDecl(TY, _, MUT) REST:LocalDecls) => - ListItem(noValue(TY, MUT)) #reserveFor(REST) + ListItem(newLocal(TY, MUT)) #reserveFor(REST) ``` Executing a function body consists of repeated calls to `#execBlock` @@ -312,19 +312,12 @@ will effectively be no-ops at this level). // all memory accesses relegated to another module (to be added) rule #execStmt(statement(statementKindAssign(PLACE, RVAL), _SPAN)) => - RVAL ~> #assign(PLACE) + #setLocalValue(PLACE, RVAL) ... // RVAL evaluation is implemented in rt/data.md - syntax KItem ::= #assign ( Place ) - - rule VAL:TypedLocal ~> #assign(PLACE) ~> CONT - => - VAL ~> #setLocalValue(PLACE) ~> CONT - - rule #execStmt(statement(statementKindSetDiscriminant(_PLACE, _VARIDX), _SPAN)) => .K // FIXME! write variant index to PLACE @@ -359,10 +352,9 @@ function call, pushing a new stack frame and returning to a different block after the call returns. ```k - rule #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) + rule #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) ~> _CONT => #execBlockIdx(I) - ... // FIXME: We assume this is empty. Explicitly throw away or check that it is? ``` @@ -370,31 +362,31 @@ A `SwitchInt` terminator selects one of the blocks given as _targets_, depending on the value of a _discriminant_. ```k + syntax KItem ::= #selectBlock ( SwitchTargets , Evaluation ) [strict(2)] + rule #execTerminator(terminator(terminatorKindSwitchInt(DISCR, TARGETS), _SPAN)) ~> _CONT => - #readOperand(DISCR) ~> #selectBlock(TARGETS) + #selectBlock(TARGETS, DISCR) - rule typedLocal(Integer(I, _, _), _, _) ~> #selectBlock(TARGETS) + rule #selectBlock(TARGETS, typedValue(Integer(I, _, _), _, _)) => #execBlockIdx(#selectBlock(I, TARGETS)) ... - rule typedLocal(BoolVal(false), _, _) ~> #selectBlock(TARGETS) + rule #selectBlock(TARGETS, typedValue(BoolVal(false), _, _)) => #execBlockIdx(#selectBlock(0, TARGETS)) ... - rule typedLocal(BoolVal(true), _, _) ~> #selectBlock(TARGETS) + rule #selectBlock(TARGETS, typedValue(BoolVal(true), _, _)) => #execBlockIdx(#selectBlock(1, TARGETS)) ... - syntax KItem ::= #selectBlock ( SwitchTargets ) - syntax BasicBlockIdx ::= #selectBlock ( Int , SwitchTargets) [function, total] | #selectBlockAux ( Int, Branches, BasicBlockIdx ) [function, total] @@ -423,10 +415,12 @@ context of the enclosing stack frame, at the _target_. If the returned value is a `Reference`, its stack height must be decremented because a stack frame is popped. NB that a stack height of `0` cannot occur here, because the compiler prevents local variable references from escaping. +If the loval `_0` does not have a value (i.e., it remained uninitialised), the function returns unit and writing the value is skipped. + ```k rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #decrementRef(LOCAL0) ~> #setLocalValue(DEST) ~> #execBlockIdx(TARGET) ~> .K + #setLocalValue(DEST, #decrementRef(LOCAL0)) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -435,14 +429,33 @@ NB that a stack height of `0` cannot occur here, because the compiler prevents l DEST => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET _ => UNWIND - ListItem(LOCAL0:TypedLocal) _ => NEWLOCALS + ListItem(LOCAL0:TypedValue) _ => NEWLOCALS // // remaining call stack (without top frame) ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK FUNCS requires CALLER in_keys(FUNCS) - // andBool DEST #within(LOCALS) - [preserves-definedness] // CALLER lookup defined, DEST within locals TODO + [preserves-definedness] // CALLER lookup defined + + // no value to return, skip writing + rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ + => + #execBlockIdx(TARGET) + + _ => CALLER + // + _ => #getBlocks(FUNCS, CALLER) + CALLER => NEWCALLER + _ => NEWDEST + someBasicBlockIdx(TARGET) => NEWTARGET + _ => UNWIND + ListItem(_:NewLocal) _ => NEWLOCALS + // + // remaining call stack (without top frame) + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + FUNCS + requires CALLER in_keys(FUNCS) + [preserves-definedness] // CALLER lookup defined syntax List ::= #getBlocks(Map, Ty) [function] | #getBlocksAux(MonoItemKind) [function, total] @@ -450,11 +463,10 @@ NB that a stack height of `0` cannot occur here, because the compiler prevents l rule #getBlocks(FUNCS, ID) => #getBlocksAux({FUNCS[ID]}:>MonoItemKind) requires ID in_keys(FUNCS) - // returns blocks from the _first_ body if there are several - // TODO handle cases with several blocks - rule #getBlocksAux(monoItemFn(_, _, .Bodies)) => .List - rule #getBlocksAux(monoItemFn(_, _, body(BLOCKS, _, _, _, _, _) _)) => toKList(BLOCKS) - // other item kinds are not expected or supported + // returns blocks from the body + rule #getBlocksAux(monoItemFn(_, _, noBody)) => .List + rule #getBlocksAux(monoItemFn(_, _, someBody(body(BLOCKS, _, _, _, _, _)))) => toKList(BLOCKS) + // other item kinds are not expected or supported FIXME: Just getting stuck for now rule #getBlocksAux(monoItemStatic(_, _, _)) => .List // should not occur in calls at all rule #getBlocksAux(monoItemGlobalAsm(_)) => .List // not supported. FIXME Should error, maybe during #init ``` @@ -475,7 +487,7 @@ The call stack is not necessarily empty at this point so it is left untouched. _ => return(VAL) noBasicBlockIdx - ListItem(typedLocal(VAL, _, _)) ... + ListItem(typedValue(VAL, _, _)) ... ... @@ -486,7 +498,7 @@ The call stack is not necessarily empty at this point so it is left untouched. noBasicBlockIdx - ListItem(noValue(_, _)) ... + ListItem(newLocal(_, _)) ... ... ``` @@ -497,10 +509,9 @@ where the returned result should go. ```k - rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) + rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) ~> _ => #setUpCalleeData({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind, ARGS) - ... CALLER => #tyOfCall(FUNC) @@ -533,7 +544,7 @@ An operand may be a `Reference` (the only way a function could access another fu // reserve space for local variables and copy/move arguments from old locals into their place rule #setUpCalleeData( - monoItemFn(_, _, body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _) _:Bodies), + monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))), ARGS ) => @@ -551,6 +562,7 @@ An operand may be a `Reference` (the only way a function could access another fu // assumption: arguments stored as _1 .. _n before actual "local" data ... + // TODO: Haven't handled "noBody" case syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) @@ -566,13 +578,13 @@ An operand may be a `Reference` (the only way a function could access another fu rule #setArgFromStack(IDX, operandConstant(_) #as CONSTOPERAND) => - #readOperand(CONSTOPERAND) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #setLocalValue(place(local(IDX), .ProjectionElems), CONSTOPERAND) ... rule #setArgFromStack(IDX, operandCopy(place(local(I), .ProjectionElems))) => - #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef({CALLERLOCALS[I]}:>TypedLocal)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List @@ -584,7 +596,7 @@ An operand may be a `Reference` (the only way a function could access another fu rule #setArgFromStack(IDX, operandMove(place(local(I), .ProjectionElems))) => - #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef({CALLERLOCALS[I]}:>TypedLocal)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS => CALLERLOCALS[I <- Moved])) _:List @@ -597,25 +609,39 @@ An operand may be a `Reference` (the only way a function could access another fu ``` The `Assert` terminator checks that an operand holding a boolean value (which has previously been computed, e.g., an overflow flag for arithmetic operations) has the expected value (e.g., that this overflow flag is `false` - a very common case). If the condition value is as expected, the program proceeds with the given `target` block. -Otherwise the provided message is passed to a `panic!` call, ending the program with an error, modelled as an `#AssertError` in the semantics. +Otherwise the provided message is passed to a `panic!` call, ending the program with an error, modelled as an `AssertError` in the semantics. ```k - syntax KItem ::= #AssertError ( AssertMessage ) + syntax MIRError ::= AssertError ( AssertMessage ) rule #execTerminator(terminator(assert(COND, EXPECTED, MSG, TARGET, _UNWIND), _SPAN)) ~> _CONT => - #readOperand(COND) ~> #expect(EXPECTED, MSG) ~> #execBlockIdx(TARGET) + #expect(COND, EXPECTED, MSG) ~> #execBlockIdx(TARGET) - syntax KItem ::= #expect ( Bool, AssertMessage ) + syntax KItem ::= #expect ( Evaluation, Bool, AssertMessage ) [strict(1)] - rule typedLocal(BoolVal(COND), _, _) ~> #expect(EXPECTED, _MSG) => .K ... + rule #expect(typedValue(BoolVal(COND), _, _), EXPECTED, _MSG) => .K ... requires COND ==Bool EXPECTED - rule typedLocal(BoolVal(COND), _, _) ~> #expect(EXPECTED, MSG) => #AssertError(MSG) ... + rule #expect(typedValue(BoolVal(COND), _, _), EXPECTED, MSG) => AssertError(MSG) ... requires COND =/=Bool EXPECTED ``` +### Stopping on Program Errors + +The semantics has a dedicated error sort to stop execution when flawed input or undefined behaviour is detected. +This includes cases of invalid MIR (e.g., accessing non-existing locals in a block or jumping to non-existing blocks), mutation of immutable values, or accessing uninitialised locals, but also user errors such as division by zero or overflowing unchecked arithmetic operations. + +The execution will stop with the respective error information as soon as an error condition is detected. + +```k + syntax KItem ::= #ProgramError ( MIRError ) + + rule [program-error]: + ERR:MIRError => #ProgramError(ERR) ... +``` + ```k endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md index 95b98e85d..ffe5e10ac 100644 --- a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md +++ b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md @@ -48,10 +48,8 @@ Therefore, its value range should be simplified for symbolic input asserted to b requires VAL true - rule hasValue(Moved) => false - rule hasValue(noValue(_, _)) => false - - rule isNoValue(typedLocal(_, _, _)) => false - rule isNoValue(Moved) => false - rule isNoValue(noValue(_, _)) => true - syntax MaybeTy ::= tyOfLocal ( TypedLocal ) [function, total] - rule tyOfLocal(typedLocal(_, TY, _)) => TY + // ---------------------------------------------------------- + rule tyOfLocal(typedValue(_, TY, _)) => TY rule tyOfLocal(Moved) => TyUnknown - rule tyOfLocal(noValue(TY, _)) => TY - - syntax Bool ::= isMutable ( TypedLocal ) [function, total] - rule isMutable(typedLocal(_, _, mutabilityMut)) => true - rule isMutable(typedLocal(_, _, mutabilityNot)) => false - rule isMutable(Moved) => false - rule isMutable(noValue(_, mutabilityMut)) => true - rule isMutable(noValue(_, mutabilityNot)) => false + rule tyOfLocal(newLocal(TY, _)) => TY + + syntax Mutability ::= mutabilityOf ( TypedLocal ) [function, total] + // ---------------------------------------------------------------- + rule mutabilityOf(typedValue(_, _, MUT)) => MUT + rule mutabilityOf(Moved) => mutabilityNot + rule mutabilityOf(newLocal(_, MUT)) => MUT ``` -Access to a `TypedLocal` (whether reading or writing( may fail for a number of reasons. -Every access is modelled as a _function_ whose result needs to be checked by the caller. +Access to a `TypedLocal` (whether reading or writing) may fail for a number of reasons. +It is an error to use a `Moved` local in any way, or to read an uninitialised `NewLocal`. +Also, locals are accessed via their index in list `` in a stack frame, which may be out of bounds. +Types are also checked, using the `Ty` (an opaque number assigned by the Stable MIR extraction). ```k syntax LocalAccessError ::= InvalidLocal ( Local ) - | TypeMismatch( Local, MaybeTy, TypedLocal ) + | TypeMismatch( Local, MaybeTy, TypedValue ) | LocalMoved( Local ) | LocalNotMutable ( Local ) - | "Uninitialised" - | "NoValueToWrite" - | "ValueMoved" - | Unsupported ( String ) // draft code + | LocalUninitialised( Local ) - syntax KItem ::= #LocalError ( LocalAccessError ) + syntax MIRError ::= LocalAccessError endmodule ``` @@ -98,10 +93,22 @@ module RT-DATA imports KMIR-CONFIGURATION ``` +### Evaluating Items to `TypedValue` or `TypedLocal` + +Some built-in operations (`RValue` or type casts) use constructs that will evaluate to a value of sort `TypedValue`. +The basic operations of reading and writing those values can use K's "heating" and "cooling" rules to describe their evaluation. +Other uses of heating and cooling are to _read_ local variables as operands. This may include `Moved` locals or uninitialised `NewLocal`s (as error cases). Therefore we use the supersort `TypedLocal` of `TypedValue` as the `Result` sort. + +```k + syntax Evaluation ::= TypedLocal // other sorts are added at the first use site + + syntax KResult ::= TypedLocal +``` + ### Reading operands (local variables and constants) ```k - syntax KItem ::= #readOperand ( Operand ) + syntax Evaluation ::= Operand ``` _Read_ access to `Operand`s (which may be local values) may have similar errors as write access. @@ -109,9 +116,9 @@ _Read_ access to `Operand`s (which may be local values) may have similar errors Constant operands are simply decoded according to their type. ```k - rule #readOperand(operandConstant(constOperand(_, _, mirConst(KIND, TY, _)))) + rule operandConstant(constOperand(_, _, mirConst(KIND, TY, _))) => - typedLocal(#decodeConstant(KIND, {TYPEMAP[TY]}:>RigidTy), TY, mutabilityNot) + typedValue(#decodeConstant(KIND, {TYPEMAP[TY]}:>RigidTy), TY, mutabilityNot) ... TYPEMAP @@ -128,7 +135,7 @@ Reading a _Copied_ operand means to simply put it in the K sequence. Obviously, local value cannot be read, though, and the value should be initialised. ```k - rule #readOperand(operandCopy(place(local(I), .ProjectionElems))) + rule operandCopy(place(local(I), .ProjectionElems)) => LOCALS[I] ... @@ -136,31 +143,29 @@ local value cannot be read, though, and the value should be initialised. LOCALS requires 0 <=Int I andBool I TypedLocal) + andBool isTypedValue(LOCALS[I]) [preserves-definedness] // valid list indexing checked - rule #readOperand(operandCopy(place(local(I) #as LOCAL, .ProjectionElems))) + rule operandCopy(place(local(I) #as LOCAL, _)) => - #LocalError(LocalMoved(LOCAL)) + LocalMoved(LOCAL) ... LOCALS - requires LOCALS[I] ==K Moved - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandCopy(place(local(I), .ProjectionElems))) + rule operandCopy(place(local(I), _)) => - #LocalError(Uninitialised) + LocalUninitialised(local(I)) ... LOCALS - requires isNoValue({LOCALS[I]}:>TypedLocal) - andBool I #readOperand(operandMove(place(local(I), .ProjectionElems))) + rule operandMove(place(local(I), .ProjectionElems)) => LOCALS[I] ... LOCALS => LOCALS[I <- Moved] - requires hasValue({LOCALS[I]}:>TypedLocal) - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandMove(place(local(I) #as LOCAL, .ProjectionElems))) + rule operandMove(place(local(I) #as LOCAL, _)) => - #LocalError(LocalMoved(LOCAL)) + LocalMoved(LOCAL) ... LOCALS - requires LOCALS[I] ==K Moved - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandMove(place(local(I), .ProjectionElems))) + rule operandMove(place(local(I), _)) => - #LocalError(Uninitialised) + LocalUninitialised(local(I)) ... LOCALS - requires isNoValue({LOCALS[I]}:>TypedLocal) - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandCopy(place(local(I), PROJECTIONS))) + rule operandCopy(place(local(I), PROJECTIONS)) => - #readProjection({LOCALS[I]}:>TypedLocal, PROJECTIONS) + #readProjection({LOCALS[I]}:>TypedValue, PROJECTIONS) ... LOCALS requires PROJECTIONS =/=K .ProjectionElems andBool 0 <=Int I andBool I TypedLocal) + andBool isTypedValue(LOCALS[I]) [preserves-definedness] // valid list indexing checked ``` @@ -236,92 +238,89 @@ Related code currently resides in the value-implementing module. ### Setting local variables (including error cases) -The `#setLocalValue` operation writes a `TypedLocal` value preceeding it in the K sequence to a given `Place` within the `List` of local variables currently on top of the stack. This may fail because a local may not be accessible, moved away, or not mutable. +The `#setLocalValue` operation writes a `TypedLocal` value to a given `Place` within the `List` of local variables currently on top of the stack. This may fail because a local may not be accessible, moved away, or not mutable. ```k - syntax KItem ::= #setLocalValue( Place ) + syntax KItem ::= #setLocalValue( Place, Evaluation ) [strict(2)] // error cases first - rule _:TypedLocal ~> #setLocalValue( place(local(I) #as LOCAL, _)) => #LocalError(InvalidLocal(LOCAL)) ... + rule #setLocalValue( place(local(I) #as LOCAL, _), _) => InvalidLocal(LOCAL) ... LOCALS requires size(LOCALS) <=Int I orBool I typedLocal(_, TY, _) #as VAL ~> #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems)) + rule #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems), typedValue(_, TY, _) #as VAL) => - #LocalError(TypeMismatch(LOCAL, tyOfLocal({LOCALS[I]}:>TypedLocal), VAL)) + TypeMismatch(LOCAL, tyOfLocal({LOCALS[I]}:>TypedLocal), VAL) ... LOCALS - requires I TypedLocal) =/=K TY [preserves-definedness] // list index checked before lookup - // setting a local to Moved is an error - rule _:TypedLocal ~> #setLocalValue( place(local(I), _)) + // setting a local which was Moved is an error + rule #setLocalValue( place(local(I), .ProjectionElems), _) => - #LocalError(LocalMoved(local(I))) + LocalMoved(local(I)) ... LOCALS - requires LOCALS[I] ==K Moved + requires 0 <=Int I + andBool I typedLocal(_, _, _) ~> #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems)) + rule #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems), _) => - #LocalError(LocalNotMutable(LOCAL)) + LocalNotMutable(LOCAL) ... LOCALS requires I TypedLocal) // not mutable - andBool notBool isNoValue({LOCALS[I]}:>TypedLocal) // noValue(_, mutabilityNot) is mutable once - - // writing no value is a no-op - rule noValue(_, _) ~> #setLocalValue( _) => .K ... - // FIXME some zero-sized values are not initialised. Otherwise we could use a special value `ZeroSized` here - - // writing a moved value is an error - rule Moved ~> #setLocalValue( _) => #LocalError(ValueMoved) ... + andBool isTypedValue(LOCALS[I]) + andBool mutabilityOf({LOCALS[I]}:>TypedLocal) ==K mutabilityNot // if all is well, write the value - // - rule typedLocal(VAL:Value, TY, _ ) ~> #setLocalValue(place(local(I), .ProjectionElems)) + // mutable local + rule #setLocalValue(place(local(I), .ProjectionElems), typedValue(VAL:Value, TY, _ )) => .K ... - LOCALS => LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)] + + LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)] + requires 0 <=Int I andBool I TypedLocal) ==K mutabilityMut andBool (tyOfLocal({LOCALS[I]}:>TypedLocal) ==K TY orBool TY ==K TyUnknown) // matching or unknown type - andBool isMutable({LOCALS[I]}:>TypedLocal) // mutable [preserves-definedness] // valid list indexing checked // special case for non-mutable uninitialised values: mutable once - rule typedLocal(VAL:Value, TY, _ ) ~> #setLocalValue(place(local(I), .ProjectionElems)) + rule #setLocalValue(place(local(I), .ProjectionElems), typedValue(VAL:Value, TY, _ )) => .K ... - LOCALS => LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityNot)] + + LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityOf({LOCALS[I]}:>TypedLocal))] + requires 0 <=Int I andBool I TypedLocal) ==K TY orBool TY ==K TyUnknown) // matching or unknown type - andBool notBool isMutable({LOCALS[I]}:>TypedLocal) // not mutable but - andBool isNoValue({LOCALS[I]}:>TypedLocal) // not initialised yet [preserves-definedness] // valid list indexing checked ``` ## Evaluation of RValues -The `RValue` sort in MIR represents various operations that produce a value which can be assigned to a `Place`. +The `Rvalue` sort in MIR represents various operations that produce a value which can be assigned to a `Place`. | RValue | Arguments | Action | |----------------|-------------------------------------------------|--------------------------------------| @@ -345,9 +344,11 @@ The `RValue` sort in MIR represents various operations that produce a value whic The most basic ones are simply accessing an operand, either directly or by way of a type cast. ```k - rule rvalueUse(OPERAND) => #readOperand(OPERAND) ... + syntax Evaluation ::= Rvalue - rule rvalueCast(CASTKIND, OPERAND, TY) => #readOperand(OPERAND) ~> #cast(CASTKIND, TY) ... + rule rvalueUse(OPERAND) => OPERAND ... + + rule rvalueCast(CASTKIND, OPERAND, TY) => #cast(OPERAND, CASTKIND, TY) ... ``` A number of unary and binary operations exist, (which are dependent on the operand types). @@ -374,7 +375,7 @@ Tuples and structs are built as `Aggregate` values with a list of argument value rule ARGS:List ~> #mkAggregate(_) => - typedLocal(Aggregate(ARGS), TyUnknown, mutabilityNot) + typedValue(Aggregate(ARGS), TyUnknown, mutabilityNot) // NB ty not determined ^^^^^^^^^ ... @@ -391,11 +392,11 @@ Tuples and structs are built as `Aggregate` values with a list of argument value rule #readOperandsAux(ACC, OP:Operand REST) => - #readOperand(OP) ~> #readOn(ACC, REST) + OP ~> #readOn(ACC, REST) ... - rule VAL:TypedLocal ~> #readOn(ACC, REST) + rule VAL:TypedValue ~> #readOn(ACC, REST) => #readOperandsAux(ACC ListItem(VAL), REST) ... @@ -416,7 +417,7 @@ The `BorrowKind` indicates mutability of the value through the reference, but al ```k rule rvalueRef(_REGION, KIND, PLACE) => - typedLocal(Reference(0, PLACE, #mutabilityOf(KIND)), TyUnknown, #mutabilityOf(KIND)) + typedValue(Reference(0, PLACE, #mutabilityOf(KIND)), TyUnknown, #mutabilityOf(KIND)) ... @@ -442,7 +443,14 @@ cast from a `TypedLocal` to another when it is followed by a `#cast` item, rewriting `typedLocal(...) ~> #cast(...) ~> REST` to `typedLocal(...) ~> REST`. ```k - syntax KItem ::= #cast( CastKind, Ty ) + syntax KItem ::= #cast( Evaluation, CastKind, Ty ) [strict(1)] + + syntax MIRError ::= CastError + + syntax CastError ::= UnknownCastTarget ( Ty , Map ) + | UnexpectedCastTarget ( CastKind, RigidTy ) + | UnexpectedCastArgument ( TypedLocal, CastKind ) + | CastNotimplemented ( CastKind ) endmodule ``` @@ -486,8 +494,6 @@ High-level values can be - references to a place in the current or an enclosing stack frame - arrays and slices (with homogenous element types) -**This sort is work in progress and will be extended and modified as we go** - ```k module RT-DATA-HIGH-SYNTAX imports RT-DATA-SYNTAX @@ -608,9 +614,10 @@ bit width, signedness, and possibly truncating or 2s-complementing the value. ```k // int casts - rule typedLocal(Integer(VAL, WIDTH, _SIGNEDNESS), _, MUT) ~> #cast(castKindIntToInt, TY) ~> CONT + rule #cast(typedValue(Integer(VAL, WIDTH, _SIGNEDNESS), _, MUT), castKindIntToInt, TY) => - typedLocal(#intAsType(VAL, WIDTH, #numTypeOf({TYPEMAP[TY]}:>RigidTy)), TY, MUT) ~> CONT + typedValue(#intAsType(VAL, WIDTH, #numTypeOf({TYPEMAP[TY]}:>RigidTy)), TY, MUT) + ... TYPEMAP requires #isIntType({TYPEMAP[TY]}:>RigidTy) @@ -664,7 +671,7 @@ bit width, signedness, and possibly truncating or 2s-complementing the value. requires #bitWidth(INTTYPE) <=Int WIDTH [preserves-definedness] // positive shift, divisor non-zero - // widening: nothing to do: VAL does change (enough bits to represent, no sign change possible) + // widening: nothing to do: VAL does not change (enough bits to represent, no sign change possible) rule #intAsType(VAL, WIDTH, INTTYPE:IntTy) => Integer(VAL, #bitWidth(INTTYPE), true) @@ -691,67 +698,53 @@ Error cases for `castKindIntToInt` * value is not a `Integer` ```k - rule (_:TypedLocal ~> #cast(castKindIntToInt, TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Int-to-Int type cast to unknown type")) ~> STUFF - - TYPEMAP - + rule #cast(_, castKindIntToInt, TY) => UnknownCastTarget(TY, TYPEMAP) ... + TYPEMAP requires notBool isRigidTy(TYPEMAP[TY]) - rule (_:TypedLocal ~> #cast(castKindIntToInt, TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Int-to-Int type cast to unexpected non-int type")) ~> STUFF - - TYPEMAP + rule #cast(_, castKindIntToInt, TY) => UnexpectedCastTarget(castKindIntToInt, {TYPEMAP[TY]}:>RigidTy) ... + TYPEMAP requires notBool (#isIntType({TYPEMAP[TY]}:>RigidTy)) - rule (_:TypedLocal ~> #cast(castKindIntToInt, _TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Int-to-Int type cast of non-int value")) ~> STUFF - + rule #cast(NONINT, castKindIntToInt, _TY) => UnexpectedCastArgument(NONINT, castKindIntToInt) ... [owise] ``` - -**TODO** Other type casts are not implemented. +Other type casts are not implemented yet. ```k - rule (_:TypedLocal ~> #cast(CASTKIND, _TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Type casts not implemented")) ~> STUFF - + rule #cast(_, CASTKIND, _TY) => CastNotimplemented(CASTKIND)... requires CASTKIND =/=K castKindIntToInt [owise] ``` ### Projections on `TypedLocal` values -The implementation of projections (a list `ProjectionElems`) accesses the structure of a stored value and therefore depends on the value representation. Function `#readProjection ( TypedLocal , Projectionelems) -> TypedLocal` is therefore implemented in the more specific module that provides a `Value` implementation. +The implementation of projections (a list `ProjectionElems`) accesses the structure of a stored value and therefore depends on the value representation. Function `#readProjection ( TypedValue , Projectionelems) -> TypedLocal` is therefore implemented in the more specific module that provides a `Value` implementation. #### Reading data from places with projections The `ProjectionElems` list contains a sequence of projections which is applied (left-to-right) to the value in a `TypedLocal` to obtain a derived value or component thereof. The `TypedLocal` argument is there for the purpose of recursion over the projections. We don't expect the operation to apply to an empty projection `.ProjectionElems`, the base case exists for the recursion. ```k - // syntax KItem ::= #readProjection ( TypedLocal , ProjectionElems ) - rule #readProjection(TL, .ProjectionElems) => TL ... + // syntax KItem ::= #readProjection ( TypedValue , ProjectionElems ) + rule #readProjection(VAL, .ProjectionElems) => VAL ... ``` A `Field` access projection operates on `struct`s and tuples, which are represented as `Aggregate` values. The field is numbered from zero (in source order), and the field type is provided (not checked here). ```k rule #readProjection( - typedLocal(Aggregate(ARGS), _, _), + typedValue(Aggregate(ARGS), _, _), projectionElemField(fieldIdx(I), _TY) PROJS ) => - #readProjection({ARGS[I]}:>TypedLocal, PROJS) + #readProjection({ARGS[I]}:>TypedValue, PROJS) ... requires 0 <=Int I andBool I #readProjection( - typedLocal(Reference(0, place(local(I:Int), PLACEPROJS:ProjectionElems), _), _, _), + typedValue(Reference(0, place(local(I:Int), PLACEPROJS:ProjectionElems), _), _, _), projectionElemDeref PROJS:ProjectionElems ) => - #readProjection({LOCALS[I]}:>TypedLocal, appendP(PLACEPROJS, PROJS)) + #readProjection({LOCALS[I]}:>TypedValue, appendP(PLACEPROJS, PROJS)) ... LOCALS requires 0 TAIL @@ -786,19 +781,25 @@ An important prerequisite of this rule is that when passing references to a call ```k rule #readProjection( - typedLocal(Reference(FRAME, place(LOCAL:Local, PLACEPROJS), _), _, _), + typedValue(Reference(FRAME, place(LOCAL:Local, PLACEPROJS), _), _, _), projectionElemDeref PROJS ) => - #readProjection(#localFromFrame({STACK[FRAME -Int 1]}:>StackFrame, LOCAL, FRAME), appendP(PLACEPROJS, PROJS)) + #readProjection( + {#localFromFrame({STACK[FRAME -Int 1]}:>StackFrame, LOCAL, FRAME)}:>TypedValue, + appendP(PLACEPROJS, PROJS) + ) ... STACK requires 0 StackFrame, LOCAL, FRAME)) [preserves-definedness] // valid list indexing checked + // TODO case of MovedLocal and NewLocal + syntax TypedLocal ::= #localFromFrame ( StackFrame, Local, Int ) [function] rule #localFromFrame(StackFrame(... locals: LOCALS), local(I:Int), OFFSET) => #adjustRef({LOCALS[I]}:>TypedLocal, OFFSET) @@ -811,8 +812,8 @@ An important prerequisite of this rule is that when passing references to a call | #decrementRef ( TypedLocal ) [function, total] | #adjustRef (TypedLocal, Int ) [function, total] - rule #adjustRef(typedLocal(Reference(HEIGHT, PLACE, REFMUT), TY, MUT), OFFSET) - => typedLocal(Reference(HEIGHT +Int OFFSET, PLACE, REFMUT), TY, MUT) + rule #adjustRef(typedValue(Reference(HEIGHT, PLACE, REFMUT), TY, MUT), OFFSET) + => typedValue(Reference(HEIGHT +Int OFFSET, PLACE, REFMUT), TY, MUT) rule #adjustRef(TL, _) => TL [owise] rule #incrementRef(TL) => #adjustRef(TL, 1) @@ -840,13 +841,15 @@ The solution is to use rewrite operations in a downward pass through the project syntax Contexts ::= List{Context, ""} rule #buildUpdate(VAL, .Contexts) => VAL + [preserves-definedness] rule #buildUpdate(VAL, CtxField(TY, ARGS, I) CTXS) - => #buildUpdate(typedLocal(Aggregate(ARGS[I <- VAL]), TY, mutabilityMut), CTXS) + => #buildUpdate(typedValue(Aggregate(ARGS[I <- VAL]), TY, mutabilityMut), CTXS) + [preserves-definedness] // valid list indexing checked upon context construction rule #projectedUpdate( DEST, - typedLocal(Aggregate(ARGS), TY, MUT), + typedValue(Aggregate(ARGS), TY, MUT), projectionElemField(fieldIdx(I), _) PROJS, UPDATE, CTXTS, @@ -859,11 +862,11 @@ The solution is to use rewrite operations in a downward pass through the project andBool I #projectedUpdate( _DEST, - typedLocal(Reference(OFFSET, place(LOCAL, PLACEPROJ), MUT), _, _), + typedValue(Reference(OFFSET, place(LOCAL, PLACEPROJ), MUT), _, _), projectionElemDeref PROJS, UPDATE, _CTXTS, @@ -889,7 +892,7 @@ The solution is to use rewrite operations in a downward pass through the project rule #projectedUpdate( _DEST, - typedLocal(Reference(OFFSET, place(local(I), PLACEPROJ), MUT), _, _), + typedValue(Reference(OFFSET, place(local(I), PLACEPROJ), MUT), _, _), projectionElemDeref PROJS, UPDATE, _CTXTS, @@ -915,20 +918,22 @@ The solution is to use rewrite operations in a downward pass through the project rule #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, false) => - #buildUpdate(NEW, CONTEXTS) ~> #setLocalValue(place(local(I), .ProjectionElems)) + #setLocalValue(place(local(I), .ProjectionElems), #buildUpdate(NEW, CONTEXTS)) ... + [preserves-definedness] // valid conmtext ensured upon context construction rule #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, true) => - #buildUpdate(NEW, CONTEXTS) ~> #forceSetLocal(local(I)) + #forceSetLocal(local(I), #buildUpdate(NEW, CONTEXTS)) ... + [preserves-definedness] // valid conmtext ensured upon context construction - syntax KItem ::= #forceSetLocal ( Local ) + syntax KItem ::= #forceSetLocal ( Local , TypedLocal ) // #forceSetLocal sets the given value unconditionally (to write Moved values) - rule VALUE:TypedLocal ~> #forceSetLocal(local(I)) + rule #forceSetLocal(local(I), VALUE) => .K ... @@ -957,8 +962,8 @@ The solution is to use rewrite operations in a downward pass through the project andBool I StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)]) + rule #updateStackLocal(StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS), I, typedValue(VAL, _, _)) + => StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)]) requires 0 <=Int I andBool I VAL ~> #setLocalValue(place(local(I), PROJ)) + rule #setLocalValue(place(local(I), PROJ), VAL) => #projectedUpdate(toLocal(I), {LOCALS[I]}:>TypedLocal, PROJ, VAL, .Contexts, false) ... @@ -980,7 +985,7 @@ We could first read the original value using `#readProjection` and compare the t requires 0 <=Int I andBool I #readOperand(operandMove(place(local(I) #as LOCAL, PROJECTIONS))) + rule operandMove(place(local(I) #as LOCAL, PROJECTIONS)) => // read first, then write moved marker (use type from before) - #readProjection({LOCALS[I]}:>TypedLocal, PROJECTIONS) ~> + #readProjection({LOCALS[I]}:>TypedValue, PROJECTIONS) ~> #markMoved({LOCALS[I]}:>TypedLocal, LOCAL, PROJECTIONS) ... @@ -1000,9 +1005,11 @@ Reading `Moved` operands requires a write operation to the read place, too, howe requires PROJECTIONS =/=K .ProjectionElems andBool 0 <=Int I andBool I VAL:TypedLocal ~> #markMoved(OLDLOCAL, local(I), PROJECTIONS) ~> CONT @@ -1027,51 +1034,25 @@ This is specific to Stable MIR, the MIR AST instead uses `WithOverflow` as t For binary operations generally, both arguments have to be read from the provided operands, followed by checking the types and then performing the actual operation (both implemented in `#compute`), which can return a `TypedLocal` or an error. A flag carries the information whether to perform an overflow check through to this function for `CheckedBinaryOp`. ```k - syntax KItem ::= #suspend ( BinOp, Operand, Bool) - | #ready ( BinOp, TypedLocal, Bool ) - | #compute ( BinOp, TypedLocal, TypedLocal, Bool ) [function, total] - - rule rvalueBinaryOp(BINOP, OP1, OP2) - => - #readOperand(OP1) ~> #suspend(BINOP, OP2, false) - ... - + syntax KItem ::= #compute ( BinOp, Evaluation, Evaluation, Bool) [seqstrict(2,3)] - rule rvalueCheckedBinaryOp(BINOP, OP1, OP2) - => - #readOperand(OP1) ~> #suspend(BINOP, OP2, true) - ... - + rule rvalueBinaryOp(BINOP, OP1, OP2) => #compute(BINOP, OP1, OP2, false) ... - rule ARG1:TypedLocal ~> #suspend(BINOP, OP2, CHECKFLAG) - => - #readOperand(OP2) ~> #ready(BINOP, ARG1, CHECKFLAG) - ... - - - rule ARG2:TypedLocal ~> #ready(BINOP, ARG1,CHECKFLAG) - => - #compute(BINOP, ARG1, ARG2, CHECKFLAG) - ... - + rule rvalueCheckedBinaryOp(BINOP, OP1, OP2) => #compute(BINOP, OP1, OP2, true) ... ``` There are also a few _unary_ operations (`UnOpNot`, `UnOpNeg`, `UnOpPtrMetadata`) used in `RValue:UnaryOp`. These operations only read a single operand and do not need a `#suspend` helper. ```k - syntax KItem ::= #applyUnOp ( UnOp ) + syntax KItem ::= #applyUnOp ( UnOp , Evaluation ) [strict(2)] - rule rvalueUnaryOp(UNOP, OP1) - => - #readOperand(OP1) ~> #applyUnOp(UNOP) - ... - + rule rvalueUnaryOp(UNOP, OP1) => #applyUnOp(UNOP, OP1) ... ``` #### Potential errors ```k - syntax KItem ::= #OperationError( OperationError ) + syntax MIRError ::= OperationError syntax OperationError ::= TypeMismatch ( BinOp, Ty, Ty ) | OperandMismatch ( BinOp, Value, Value ) @@ -1079,19 +1060,22 @@ There are also a few _unary_ operations (`UnOpNot`, `UnOpNeg`, `UnOpPtrMetadata` | OperandMismatch ( UnOp, Value ) | OperandError( UnOp, TypedLocal) // errors above are compiler bugs or invalid MIR - | Unimplemented ( BinOp, TypedLocal, TypedLocal) + | OpNotimplemented ( BinOp, TypedValue, TypedValue) // errors below are program errors | "DivisionByZero" - | "Overflow_U_B" // better than getting stuck + | "Overflow_U_B" + + // catch Moved or uninitialised operands + rule #compute(OP, ARG1, ARG2, _FLAG) => OperandError(OP, ARG1, ARG2) + requires notBool (isTypedValue(ARG1) andBool isTypedValue(ARG2)) - // catch pathological cases where ARG1 or ARG2, or both, are Moved or NoValue. - rule #compute(OP, ARG1, ARG2, _FLAG) => #OperationError(OperandError(OP, ARG1, ARG2)) - requires notBool (hasValue(ARG1) andBool hasValue(ARG2)) + rule #applyUnOp(OP, ARG) => OperandError(OP, ARG) + requires notBool isTypedValue(ARG) // catch-all rule to make `#compute` total - rule #compute(OP, ARG1, ARG2, _FLAG) - => - #OperationError(Unimplemented(OP, ARG1, ARG2)) + rule #compute(OP, ARG1, ARG2, _FLAG) => OpNotimplemented(OP, ARG1, ARG2) + requires isTypedValue(ARG1) + andBool isTypedValue(ARG2) [owise] ``` @@ -1138,75 +1122,22 @@ The arithmetic operations require operands of the same numeric type. requires Y =/=Int 0 // operation undefined otherwise + // Checked operations return a pair of the truncated value and an overflow flag + // signed numbers: must check for wrap-around (operation specific) rule #compute( BOP, - typedLocal(Integer(ARG1, WIDTH, SIGNEDNESS), TY, _), - typedLocal(Integer(ARG2, WIDTH, SIGNEDNESS), TY, _), - CHK) + typedValue(Integer(ARG1, WIDTH, true), TY, _), //signed + typedValue(Integer(ARG2, WIDTH, true), TY, _), + true) // checked => - #arithmeticInt(BOP, ARG1, ARG2, WIDTH, SIGNEDNESS, TY, CHK) - requires isArithmetic(BOP) - [preserves-definedness] - - // error cases: - // non-scalar arguments - rule #compute(BOP, typedLocal(ARG1, TY, _), typedLocal(ARG2, TY, _), _) - => - #OperationError(OperandMismatch(BOP, ARG1, ARG2)) - requires isArithmetic(BOP) - [owise] - - // different argument types - rule #compute(BOP, typedLocal(_, TY1, _), typedLocal(_, TY2, _), _) - => - #OperationError(TypeMismatch(BOP, TY1, TY2)) - requires TY1 =/=K TY2 - andBool isArithmetic(BOP) - [owise] - - // helper function to truncate int values - syntax Int ::= truncate(Int, Int, Signedness) [function, total] - // ------------------------------------------------------------- - // unsigned values can be truncated using a simple bitmask - // NB if VAL is negative (underflow), the truncation will yield a positive number - rule truncate(VAL, WIDTH, Unsigned) - => // mask with relevant bits - VAL &Int ((1 < VAL // shortcut when there is nothing to do - requires 0 // bit-based truncation, then establishing the sign by subtracting a bias - (VAL &Int ((1 <=Int (1 < - typedLocal( + typedValue( Aggregate( - ListItem(typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot)) + ListItem(typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot)) ListItem( - typedLocal( + typedValue( BoolVal( - // overflow: Result outside valid range - (1 < - typedLocal( + typedValue( Aggregate( - ListItem(typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot)) + ListItem(typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot)) ListItem( - typedLocal( + typedValue( BoolVal( - // overflow flag: true if infinite precision result is not equal to truncated result + // overflow flag: compare to truncated result truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned) =/=Int onInt(BOP, ARG1, ARG2) ), TyUnknown, @@ -1243,53 +1177,125 @@ The arithmetic operations require operands of the same numeric type. requires isArithmetic(BOP) [preserves-definedness] - // performing unchecked operations may result in undefined behaviour, which we signal. - // The check it the same as the one for the overflow flag above + // Unchecked operations signal undefined behaviour on overflow. The checks are the same as for the flags above. - rule #arithmeticInt(BOP, ARG1, ARG2, WIDTH, true, TY, false) - => typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + rule #compute( + BOP, + typedValue(Integer(ARG1, WIDTH, true), TY, _), // signed + typedValue(Integer(ARG2, WIDTH, true), TY, _), + false) // unchecked + => typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot) requires isArithmetic(BOP) // infinite precision result must equal truncated result andBool truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed) ==Int onInt(BOP, ARG1, ARG2) [preserves-definedness] // unsigned numbers: simple overflow check using a bit mask - rule #arithmeticInt(BOP, ARG1, ARG2, WIDTH, false, TY, false) - => typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) + rule #compute( + BOP, + typedValue(Integer(ARG1, WIDTH, false), TY, _), // unsigned + typedValue(Integer(ARG2, WIDTH, false), TY, _), + false) // unchecked + => typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) requires isArithmetic(BOP) // infinite precision result must equal truncated result andBool truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned) ==Int onInt(BOP, ARG1, ARG2) [preserves-definedness] - rule #arithmeticInt(BOP, _, _, _, _, _, false) => #OperationError(Overflow_U_B) + // lower-priority rule to catch undefined behaviour + rule #compute( + BOP, + typedValue(Integer(_, WIDTH, SIGNEDNESS), TY, _), + typedValue(Integer(_, WIDTH, SIGNEDNESS), TY, _), + false) // unchecked + => Overflow_U_B requires isArithmetic(BOP) - [owise] + [priority(60)] // These are additional high priority rules to detect/report divbyzero and div/rem overflow/underflow // (the latter can only happen for signed Ints with dividend minInt and divisor -1 - rule #arithmeticInt(binOpDiv, _, DIVISOR, _, _, _, _) + rule #compute(binOpDiv, _, typedValue(Integer(DIVISOR, _, _), _, _), _) => - #OperationError(DivisionByZero) + DivisionByZero requires DIVISOR ==Int 0 [priority(40)] - rule #arithmeticInt(binOpRem, _, DIVISOR, _, _, _, _) + + rule #compute(binOpRem, _, typedValue(Integer(DIVISOR, _, _), _, _), _) => - #OperationError(DivisionByZero) + DivisionByZero requires DIVISOR ==Int 0 [priority(40)] - rule #arithmeticInt(binOpDiv, DIVIDEND, DIVISOR, WIDTH, true, _, _) + rule #compute( + binOpDiv, + typedValue(Integer(DIVIDEND, WIDTH, true), TY, _), // signed + typedValue(Integer(DIVISOR, WIDTH, true), TY, _), + _) => - #OperationError(Overflow_U_B) + Overflow_U_B requires DIVISOR ==Int -1 andBool DIVIDEND ==Int 0 -Int (1 < - #OperationError(Overflow_U_B) + Overflow_U_B requires DIVISOR ==Int -1 andBool DIVIDEND ==Int 0 -Int (1 < + OperandMismatch(BOP, ARG1, ARG2) + requires isArithmetic(BOP) + [owise] + + // different argument types + rule #compute(BOP, typedValue(_, TY1, _), typedValue(_, TY2, _), _) + => + TypeMismatch(BOP, TY1, TY2) + requires TY1 =/=K TY2 + andBool isArithmetic(BOP) + [owise] + + + // helper function to truncate int values + syntax Int ::= truncate(Int, Int, Signedness) [function, total] + // ------------------------------------------------------------- + // unsigned values can be truncated using a simple bitmask + // NB if VAL is negative (underflow), the truncation will yield a positive number + rule truncate(VAL, WIDTH, Unsigned) + => // mask with relevant bits + VAL &Int ((1 < VAL // shortcut when there is nothing to do + requires 0 // if truncated value small enough and positive, all is done + (VAL &Int ((1 < // subtract a bias when the truncation result too large + (VAL &Int ((1 <=Int (1 < cmpOpBool(binOpLe, Y, X) rule cmpOpBool(binOpGt, X, Y) => cmpOpBool(binOpLt, Y, X) - rule #compute(OP, typedLocal(_, TY, _), typedLocal(_, TY2, _), _) => #OperationError(TypeMismatch(OP, TY, TY2)) + rule #compute(OP, typedValue(_, TY, _), typedValue(_, TY2, _), _) => TypeMismatch(OP, TY, TY2) requires isComparison(OP) andBool TY =/=K TY2 - rule #compute(OP, typedLocal(Integer(VAL1, WIDTH, SIGN), TY, _), typedLocal(Integer(VAL2, WIDTH, SIGN), TY, _), _) + rule #compute(OP, typedValue(Integer(VAL1, WIDTH, SIGN), TY, _), typedValue(Integer(VAL2, WIDTH, SIGN), TY, _), _) => - typedLocal(BoolVal(cmpOpInt(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) + typedValue(BoolVal(cmpOpInt(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) requires isComparison(OP) + [preserves-definedness] // OP known to be a comparison - rule #compute(OP, typedLocal(BoolVal(VAL1), TY, _), typedLocal(BoolVal(VAL2), TY, _), _) + rule #compute(OP, typedValue(BoolVal(VAL1), TY, _), typedValue(BoolVal(VAL2), TY, _), _) => - typedLocal(BoolVal(cmpOpBool(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) + typedValue(BoolVal(cmpOpBool(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) requires isComparison(OP) + [preserves-definedness] // OP known to be a comparison - rule #compute(OP, typedLocal(ARG1, TY, _), typedLocal(ARG2, TY, _), _) + rule #compute(OP, typedValue(ARG1, TY, _), typedValue(ARG2, TY, _), _) => - #OperationError(OperandMismatch(OP, ARG1, ARG2)) + OperandMismatch(OP, ARG1, ARG2) + requires isComparison(OP) [owise] ``` @@ -1358,14 +1367,13 @@ The `binOpCmp` operation returns `-1`, `0`, or `+1` (the behaviour of Rust's `st rule cmpBool(X, Y) => 0 requires X ==Bool Y rule cmpBool(X, Y) => 1 requires X andBool notBool Y - rule #compute(binOpCmp, typedLocal(Integer(VAL1, WIDTH, SIGN), TY, _), typedLocal(Integer(VAL2, WIDTH, SIGN), TY, _), _) + rule #compute(binOpCmp, typedValue(Integer(VAL1, WIDTH, SIGN), TY, _), typedValue(Integer(VAL2, WIDTH, SIGN), TY, _), _) => - typedLocal(Integer(cmpInt(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) + typedValue(Integer(cmpInt(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) - rule #compute(binOpCmp, typedLocal(BoolVal(VAL1), TY, _), typedLocal(BoolVal(VAL2), TY, _), _) + rule #compute(binOpCmp, typedValue(BoolVal(VAL1), TY, _), typedValue(BoolVal(VAL2), TY, _), _) => - typedLocal(Integer(cmpBool(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) - + typedValue(Integer(cmpBool(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) ``` #### Unary operations on Boolean and integral values @@ -1374,9 +1382,9 @@ The `unOpNeg` operation only works signed integral (and floating point) numbers. An overflow can happen when negating the minimal representable integral value (in the given `WIDTH`). The semantics of the operation in this case is to wrap around (with the given bit width). ```k - rule typedLocal(Integer(VAL, WIDTH, true), TY, _) ~> #applyUnOp(unOpNeg) + rule #applyUnOp(unOpNeg, typedValue(Integer(VAL, WIDTH, true), TY, _)) => - typedLocal(Integer(truncate(0 -Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + typedValue(Integer(truncate(0 -Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) ... @@ -1386,27 +1394,27 @@ An overflow can happen when negating the minimal representable integral value (i The `unOpNot` operation works on boolean and integral values, with the usual semantics for booleans and a bitwise semantics for integral values (overflows cannot occur). ```k - rule typedLocal(BoolVal(VAL), TY, _) ~> #applyUnOp(unOpNot) + rule #applyUnOp(unOpNot, typedValue(BoolVal(VAL), TY, _)) => - typedLocal(BoolVal(notBool VAL), TY, mutabilityNot) + typedValue(BoolVal(notBool VAL), TY, mutabilityNot) ... - rule typedLocal(Integer(VAL, WIDTH, true), TY, _) ~> #applyUnOp(unOpNot) + rule #applyUnOp(unOpNot, typedValue(Integer(VAL, WIDTH, true), TY, _)) => - typedLocal(Integer(truncate(~Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + typedValue(Integer(truncate(~Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) ... - rule typedLocal(Integer(VAL, WIDTH, false), TY, _) ~> #applyUnOp(unOpNot) + rule #applyUnOp(unOpNot, typedValue(Integer(VAL, WIDTH, false), TY, _)) => - typedLocal(Integer(truncate(~Int VAL, WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) + typedValue(Integer(truncate(~Int VAL, WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) ... ``` ```k - rule typedLocal(VAL, _, _) ~> #applyUnOp(OP) => #OperationError(OperandMismatch(OP, VAL)) ... + rule #applyUnOp(OP, typedValue(VAL, _, _)) => OperandMismatch(OP, VAL) ... [owise] ``` @@ -1428,7 +1436,7 @@ The `unOpNot` operation works on boolean and integral values, with the usual sem One important use case of `UbChecks` is to determine overflows in unchecked arithmetic operations. Since our arithmetic operations signal undefined behaviour on overflow independently, the value returned by `UbChecks` is `false` for now. ```k - rule rvalueNullaryOp(nullOpUbChecks, _) => typedLocal(BoolVal(false), TyUnknown, mutabilityNot) ... + rule rvalueNullaryOp(nullOpUbChecks, _) => typedValue(BoolVal(false), TyUnknown, mutabilityNot) ... ``` #### "Nullary" operations reifying type information diff --git a/kmir/src/kmir/parse/notes.md b/kmir/src/kmir/parse/notes.md index f242edbef..df79d454f 100644 --- a/kmir/src/kmir/parse/notes.md +++ b/kmir/src/kmir/parse/notes.md @@ -36,7 +36,7 @@ json: an array of integer values between 0 and 255 syntax Elems ::= List {Elem, ""} [group(mir-list), ...] ``` json: a homogeneous list, e.g. `[e1, e2, e3, ...]`, where all elements correspond to syntactic productions for the sort `Elem`. -As per naming convention, the list sort `Elems` (plural) should contain elements of sort `Elem` (singular). Usual plural formation rules (`Body -> Bodies`, `Branch -> Branches`) are respected. +As per naming convention, the list sort `Elems` (plural) should contain elements of sort `Elem` (singular). Usual plural formation rules (`Branch -> Branches`) are respected. #### mir-klist-ElementSort ``` diff --git a/kmir/src/kmir/parse/parser.py b/kmir/src/kmir/parse/parser.py index 4050b0714..453a9becd 100644 --- a/kmir/src/kmir/parse/parser.py +++ b/kmir/src/kmir/parse/parser.py @@ -113,7 +113,7 @@ def _list_symbols(sort: str) -> tuple[str, str]: # Given a list Sort, return the element sort. def _element_sort(sort: KSort) -> KSort: name = sort.name - if name.endswith('ies'): # Bodies, Entries, ... + if name.endswith('ies'): # Entries, ... return KSort(name[:-3] + 'y') elif ( # -es for words ending in 's', 'ch', 'sh', 'ss', 'x' or 'z' name.endswith('ses') diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json index 0440b6464..212c5f2aa 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json @@ -1,3678 +1,3652 @@ { - "name": "arithmetic_unchecked_runs", - "crate_id": 13794361957699792544, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 56, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 117, - 98, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 117, - 56, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 97, - 100, - 100, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] + "name": "arithmetic_unchecked_runs", + "crate_id": 13794361957699792544, + "allocs": [ + [ + 3, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 117, + 56, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 97, + 100, + 100, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE" - } - ], - [ - 29, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE" - } - ], - [ - 23, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h3a5ca15c2000251eE" - } - ], - [ - 27, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E" - } - ], - [ + [ + 2, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, 41, - { - "NoOpSym": "" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E" - } - ], - [ - 31, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E" - } - ] + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 56, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 117, + 98, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 31, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start17h665493b8ec74817bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + [ + 38, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE" + } + ], + [ + 23, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h3a5ca15c2000251eE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E" + } + ], + [ + 29, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "Field": [ + 0, + 15 + ] }, { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 13 + ] + } + } } - ] + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - }, - "details": null - }, - { - "symbol_name": "_ZN25arithmetic_unchecked_runs4main17h1bc17631fcb9d7bbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 10, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 101, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - }, - { - "Constant": { - "span": 102, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - } - ] - } - ] - }, - "span": 103 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 101, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - }, - { - "Constant": { - "span": 102, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 103 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 103 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 104, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 15 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 105, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 16 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 106 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Constant": { - "span": 107, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 17 - } - } - }, - { - "Constant": { - "span": 108, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 18 - } - } - } - ] - } - ] - }, - "span": 109 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Constant": { - "span": 107, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 17 - } - } - }, - { - "Constant": { - "span": 108, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 18 - } - } - } - ] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 109 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 109 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 110, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Constant": { - "span": 111, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 20 - } - } - } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 112 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 114 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 115 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 8, - "projection": [] - } - }, - { - "Copy": { - "local": 9, - "projection": [] - } - } - ] - } - ] - }, - "span": 113 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 10, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Move": { - "local": 9, - "projection": [] - } - } - ] - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 113 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 10, - "projection": [ - { - "Field": [ - 0, - 35 - ] - } - ] - } - } - } - ] - }, - "span": 113 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 117 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 7, - "projection": [] - } - }, - { - "Copy": { - "local": 12, - "projection": [] - } - } - ] - } - ] - }, - "span": 116 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 7, - "projection": [] - } - }, - { - "Move": { - "local": 12, - "projection": [] - } - } - ] - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 116 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 0, - 35 - ] - } - ] - } - } - } - ] - }, - "span": 116 - } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 9, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 97, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 118 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 119, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 120, - "mutability": "Not" - }, - { - "ty": 28, - "span": 103, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 121, - "mutability": "Not" - }, - { - "ty": 2, - "span": 122, - "mutability": "Not" - }, - { - "ty": 26, - "span": 109, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 123, - "mutability": "Not" - }, - { - "ty": 35, - "span": 124, - "mutability": "Not" - }, - { - "ty": 35, - "span": 114, - "mutability": "Mut" - }, - { - "ty": 35, - "span": 115, - "mutability": "Mut" - }, - { - "ty": 36, - "span": 113, - "mutability": "Mut" - }, - { - "ty": 35, - "span": 125, - "mutability": "Not" - }, - { - "ty": 35, - "span": 117, - "mutability": "Mut" - }, - { - "ty": 36, - "span": 116, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 120, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 121, - "scope": 2 + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 122, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 123, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 124, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 7, - "projection": [] - } - }, - "argument_index": null + "align": 1, + "mutability": "Mut" + } }, - { - "name": "f", - "source_info": { - "span": 125, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 11, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 126 + "ty": 17, + "id": 13 + } + } + } } - ] + ] + }, + "span": 97 + } + ], + "terminator": { + "kind": "Return", + "span": 96 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" + } + ], + "locals": [ + { + "ty": 17, + "span": 98, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 99, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 99, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h675110f50b410d54E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 94, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 29, - "id": 11 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 + }, + "ty": 24, + "id": 8 + } + } } - ] + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub::precondition_check", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 66, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 25, - "span": 62, - "mutability": "Not" - }, - { - "ty": 2, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 26, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 25, + "span": 62, + "mutability": "Not" + }, + { + "ty": 2, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 26, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] } - ] + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add::precondition_check", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 80 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 81 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 81 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 82 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 84 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 79 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 86, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 66, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 10 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 87 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 88 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 89, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 90, - "mutability": "Not" - }, - { - "ty": 9, - "span": 90, - "mutability": "Not" - }, - { - "ty": 25, - "span": 87, - "mutability": "Not" - }, - { - "ty": 9, - "span": 82, - "mutability": "Not" - }, - { - "ty": 21, - "span": 83, - "mutability": "Not" - }, - { - "ty": 28, - "span": 81, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 90, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 90, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 91, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 92, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 82, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 83, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 93 + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } } - ] + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 51, + "mutability": "Not" + }, + { + "ty": 2, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 94 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 94, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 12 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 94 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + }, + { + "ty": 32, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add::precondition_check", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 80 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 81 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 81 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + ] + } + } + } + ] + }, + "span": 82 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 84 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 79 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 86, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" } - ], - "spread_arg": null, - "span": 3 + }, + "ty": 24, + "id": 10 + } + } } - ] + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 87 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h4ef9f89b76c476d3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 95, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 95, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 95 + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 88 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 89, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 90, + "mutability": "Not" + }, + { + "ty": 9, + "span": 90, + "mutability": "Not" + }, + { + "ty": 25, + "span": 87, + "mutability": "Not" + }, + { + "ty": 9, + "span": 82, + "mutability": "Not" + }, + { + "ty": 21, + "span": 83, + "mutability": "Not" + }, + { + "ty": 28, + "span": 81, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 90, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 90, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 91, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 92, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 82, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 83, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 93 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } } - ] + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 69 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 70, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 71 + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 70, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 71 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 73 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "AddUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 74 + } + ], + "terminator": { + "kind": "Return", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 9, + "span": 75, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 76, + "mutability": "Not" + }, + { + "ty": 9, + "span": 77, + "mutability": "Not" + }, + { + "ty": 21, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 71, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 78 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN25arithmetic_unchecked_runs4main17h1bc17631fcb9d7bbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 10, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 101, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "AddUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 74 - } - ], - "terminator": { - "kind": "Return", - "span": 72 + }, + "ty": 9, + "id": 14 + } + } + }, + { + "Constant": { + "span": 102, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 14 } - ], - "locals": [ - { - "ty": 9, - "span": 75, + } + } + ] + } + ] + }, + "span": 103 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 101, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" - }, - { - "ty": 9, - "span": 76, - "mutability": "Not" - }, - { - "ty": 9, - "span": 77, - "mutability": "Not" - }, - { - "ty": 21, - "span": 69, + } + }, + "ty": 9, + "id": 14 + } + } + }, + { + "Constant": { + "span": 102, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" - }, - { - "ty": 1, - "span": 71, - "mutability": "Not" + } + }, + "ty": 9, + "id": 14 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 103 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 76, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + ] + } + } + } + ] + }, + "span": 103 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 104, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 15 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 105, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ], - "spread_arg": null, - "span": 78 + }, + "ty": 9, + "id": 16 + } + } } - ] + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 106 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Constant": { + "span": 107, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 17 } - ], - "locals": [ - { - "ty": 1, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" + } + }, + { + "Constant": { + "span": 108, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 18 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 + } + } + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 9, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 97, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 13 - } - } - } - } - ] - }, - "span": 97 - } + ] + }, + "span": 109 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Constant": { + "span": 107, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 96 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 98, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 99, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 99, - "scope": 0 + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 17 + } + } + }, + { + "Constant": { + "span": 108, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 18 + } + } + } + ] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 109 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "spread_arg": null, - "span": 100 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 94 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 94, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 12 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 94 - } + ] + }, + "span": 109 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 110, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "span": 111, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ], - "locals": [ - { - "ty": 16, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" - }, - { - "ty": 32, - "span": 94, - "mutability": "Not" + }, + "ty": 2, + "id": 20 + } + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 112 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 114 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 115 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 8, + "projection": [] + } + }, + { + "Copy": { + "local": 9, + "projection": [] + } + } + ] + } + ] + }, + "span": 113 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 10, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Move": { + "local": 9, + "projection": [] + } + } + ] + }, + "target": 5, + "unwind": "Continue" + } + }, + "span": 113 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 10, + "projection": [ + { + "Field": [ + 0, + 35 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 + ] + } + } } - ] + ] + }, + "span": 113 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 117 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 7, + "projection": [] + } + }, + { + "Copy": { + "local": 12, + "projection": [] + } + } + ] + } + ] + }, + "span": 116 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 7, + "projection": [] + } + }, + { + "Move": { + "local": 12, + "projection": [] + } + } + ] + }, + "target": 6, + "unwind": "Continue" + } + }, + "span": 116 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "SubUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 0, + 35 + ] } - ], - "locals": [ - { - "ty": 2, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 51, - "mutability": "Not" - }, - { - "ty": 2, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 116 + } + ], + "terminator": { + "kind": "Return", + "span": 118 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 119, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 120, + "mutability": "Not" + }, + { + "ty": 28, + "span": 103, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 121, + "mutability": "Not" + }, + { + "ty": 2, + "span": 122, + "mutability": "Not" + }, + { + "ty": 26, + "span": 109, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 123, + "mutability": "Not" + }, + { + "ty": 35, + "span": 124, + "mutability": "Not" + }, + { + "ty": 35, + "span": 114, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 115, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 113, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 125, + "mutability": "Not" + }, + { + "ty": 35, + "span": 117, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 116, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 120, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 121, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 122, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 123, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 124, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 7, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 125, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 126 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h675110f50b410d54E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 94, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 11 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h4ef9f89b76c476d3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 95, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 95, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 95 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h665493b8ec74817bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "arg_count": 2, - "var_debug_info": [ + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "Downcast": 0 }, { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "Field": [ + 0, + 6 + ] } - ], - "spread_arg": null, - "span": 53 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } + }, + "details": null + } + ], + "types": [ + [ + 21, + { + "RigidTy": "Bool" + } ], - "types": [ - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 35, - { - "RigidTy": { - "Int": "I16" - } - } - ] + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 35, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } ], - "debug": null -} \ No newline at end of file + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state index 4dfd2da71..0f2f3f8c5 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state @@ -31,23 +31,23 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) @@ -55,16 +55,16 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 97 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 96 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 99 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 84 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 86 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 87 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 88 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) .Bodies ) - ty ( 29 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 94 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 9 ) , span: span ( 75 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 10 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 105 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 109 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 111 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 112 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 115 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 113 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 118 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 116 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 126 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 97 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 96 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 99 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 84 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 86 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 87 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 88 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) + ty ( 29 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 94 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 9 ) , span: span ( 75 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 105 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 109 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 111 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 112 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 115 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 113 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 118 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 116 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 126 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json index 587fdfc54..4f2cbdca4 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json @@ -1,2785 +1,2767 @@ { - "name": "arithmetic", - "crate_id": 3562334553558048806, - "allocs": [], - "functions": [ - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ] + "name": "arithmetic", + "crate_id": 3562334553558048806, + "allocs": [], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hddd54efbfb63f680E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" + } + ], + [ + 33, + { + "NoOpSym": "" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hddd54efbfb63f680E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h408f33832fba4274E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + } + ] + ] } - ] + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "ty": 7, - "span": 43, - "mutability": "Not" + "Downcast": 0 }, { - "ty": 1, - "span": 43, - "mutability": "Not" + "Field": [ + 0, + 6 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10arithmetic4main17hcd0e28aacae0c2e9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 9 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + } + } + ] + } + ] + }, + "span": 52 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 3 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 11 } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 11 + } + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 12 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 + } + } + ] + } + ] + }, + "span": 57 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 12 + } + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 + } + } + } + ] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 57 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "spread_arg": null, - "span": 49 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 14 } - ], - "locals": [ - { - "ty": 16, - "span": 43, + } + } + ] + } + ] + }, + "span": 59 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 8, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" + } + }, + "ty": 2, + "id": 14 + } + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 59 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 8, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN10arithmetic4main17hcd0e28aacae0c2e9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - } - ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 11 - } - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 11 - } - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 12 - } - } - }, - { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - ] - } - ] - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 12 - } - } - }, - { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - ] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 14 - } - } - } - ] - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 14 - } - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 59 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 9 - ] - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 11, - "projection": [] - } - }, - { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - } - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 12, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Move": { - "local": 11, - "projection": [] - } - }, - { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - } - ] - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 12, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 10, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 63 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Move": { - "local": 10, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 63 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 63 - }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 65 - }, - { - "kind": { - "Assign": [ - { - "local": 16, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 66 - }, - { - "kind": { - "Assign": [ - { - "local": 17, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 15, - "projection": [] - } - }, - { - "Copy": { - "local": 16, - "projection": [] - } - } - ] - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 17, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Move": { - "local": 15, - "projection": [] - } - }, - { - "Move": { - "local": 16, - "projection": [] - } - } - ] - }, - "target": 7, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 17, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 64 - }, - { - "kind": { - "Assign": [ - { - "local": 19, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 68 - }, - { - "kind": { - "Assign": [ - { - "local": 20, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 14, - "projection": [] - } - }, - { - "Copy": { - "local": 19, - "projection": [] - } - } - ] - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 20, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 14, - "projection": [] - } - }, - { - "Move": { - "local": 19, - "projection": [] - } - } - ] - }, - "target": 8, - "unwind": "Continue" - } - }, - "span": 67 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 18, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 20, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": "Return", - "span": 69 + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 11, + "projection": [] + } + }, + { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 9 } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 71, - "mutability": "Not" - }, - { - "ty": 27, - "span": 52, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 72, - "mutability": "Not" - }, - { - "ty": 27, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 73, - "mutability": "Not" - }, - { - "ty": 2, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 59, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 74, - "mutability": "Not" - }, - { - "ty": 9, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 62, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 75, - "mutability": "Not" - }, - { - "ty": 26, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 76, - "mutability": "Not" - }, - { - "ty": 26, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 67, + } + } + ] + } + ] + }, + "span": 61 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 12, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Move": { + "local": 11, + "projection": [] + } + }, + { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + } + ] + }, + "target": 5, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 12, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 71, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 72, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 73, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 74, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 9, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 75, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 14, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "f", - "source_info": { - "span": 76, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 18, - "projection": [] - } - }, - "argument_index": null + ] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 63 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + }, + "target": 6, + "unwind": "Continue" + } + }, + "span": 63 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 77 + ] + } + } } - ] + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 65 + }, + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 66 + }, + { + "kind": { + "Assign": [ + { + "local": 17, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 15, + "projection": [] + } + }, + { + "Copy": { + "local": 16, + "projection": [] + } + } + ] + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 17, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Move": { + "local": 15, + "projection": [] + } + }, + { + "Move": { + "local": 16, + "projection": [] + } + } + ] + }, + "target": 7, + "unwind": "Continue" + } + }, + "span": 64 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h2376acb044c61e74E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 17, + "projection": [ + { + "Field": [ + 0, + 26 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 64 + }, + { + "kind": { + "Assign": [ + { + "local": 19, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 68 + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 14, + "projection": [] + } + }, + { + "Copy": { + "local": 19, + "projection": [] + } + } + ] + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 20, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 14, + "projection": [] + } + }, + { + "Move": { + "local": 19, + "projection": [] + } + } + ] + }, + "target": 8, + "unwind": "Continue" + } + }, + "span": 67 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 18, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 20, + "projection": [ + { + "Field": [ + 0, + 26 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": "Return", + "span": 69 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h408f33832fba4274E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 52, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 72, + "mutability": "Not" + }, + { + "ty": 27, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 73, + "mutability": "Not" + }, + { + "ty": 2, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 59, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 74, + "mutability": "Not" + }, + { + "ty": 9, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 75, + "mutability": "Not" + }, + { + "ty": 26, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 76, + "mutability": "Not" + }, + { + "ty": 26, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 67, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 71, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 72, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 73, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 74, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 75, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 76, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 18, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 77 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" + } }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h2376acb044c61e74E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "Field": [ + 0, + 15 + ] }, { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 13 + ] + } + } } - ] + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" } + } ], - "types": [ - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 26, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 25, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ] + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } ], - "debug": null -} \ No newline at end of file + [ + 25, + { + "RigidTy": "Bool" + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state index 79b22201f..31fb43dd2 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -33,34 +33,34 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) @@ -68,12 +68,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json index 2d5b11ed1..4ac711f72 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json @@ -1,1951 +1,1933 @@ { - "name": "unary", - "crate_id": 16478188162494399089, - "allocs": [], - "functions": [ - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E" - } - ] + "name": "unary", + "crate_id": 16478188162494399089, + "allocs": [], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start17hdc5efb1e0bda457bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE" + } + ], + [ + 27, + { + "NoOpSym": "" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + "provenance": { + "ptrs": [] }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "align": 1, + "mutability": "Mut" + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 + "ty": 17, + "id": 8 + } + } + } } - ] + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h6102650d02f5b9f6E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h6102650d02f5b9f6E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN5unary4main17hb4d720234eb3817dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN5unary4main17hb4d720234eb3817dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - } - ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 133 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 - } - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 12 - } - } - } - ] - } - ] - }, - "span": 58 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [] - } - }, - "expected": false, - "msg": { - "OverflowNeg": { - "Copy": { - "local": 4, - "projection": [] - } - } - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 53 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "UnaryOp": [ - "Neg", - { - "Copy": { - "local": 4, - "projection": [] - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": "Return", - "span": 59 + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 9 } - ], - "locals": [ - { - "ty": 1, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 61, - "mutability": "Not" - }, - { - "ty": 26, - "span": 52, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 62, - "mutability": "Not" - }, - { - "ty": 2, - "span": 63, - "mutability": "Not" - }, - { - "ty": 25, - "span": 64, - "mutability": "Not" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 25, - "span": 53, - "mutability": "Mut" + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 61, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 62, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 63, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + } + } + ] + } + ] + }, + "span": 52 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] }, - "argument_index": null + "align": 1, + "mutability": "Mut" + } }, - { - "name": "d", - "source_info": { - "span": 64, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] }, - "argument_index": null + "align": 1, + "mutability": "Mut" + } }, - { - "name": "e", - "source_info": { - "span": 65, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null + "ty": 9, + "id": 10 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 66 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "local": 3, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 133 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 11 } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + } + } + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "local": 5, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 25, + "id": 12 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 + } + } + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ + ] + }, + "span": 58 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 13 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 + } + } + ] } - ] + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [] + } + }, + "expected": false, + "msg": { + "OverflowNeg": { + "Copy": { + "local": 4, + "projection": [] + } + } + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 53 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ + }, + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + "local": 6, + "projection": [] + }, + { + "UnaryOp": [ + "Neg", + { + "Copy": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": "Return", + "span": 59 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 61, + "mutability": "Not" + }, + { + "ty": 26, + "span": 52, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 62, + "mutability": "Not" + }, + { + "ty": 2, + "span": 63, + "mutability": "Not" + }, + { + "ty": 25, + "span": 64, + "mutability": "Not" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 25, + "span": 53, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 61, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 62, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 63, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 64, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 65, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 66 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hdc5efb1e0bda457bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "spread_arg": null, - "span": 42 + } + ] + ] } - ] + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } + "Downcast": 0 }, { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } + "Field": [ + 0, + 6 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17ha3656d0fc756ed53E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, { - "ty": 22, - "span": 44, - "mutability": "Not" + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + ] + } + } } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17ha3656d0fc756ed53E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } + }, + "details": null + } + ], + "types": [ + [ + 25, + { + "RigidTy": "Bool" + } ], - "types": [ - [ - 25, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ] + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } ], - "debug": null -} \ No newline at end of file + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state index b5e026aa5..c038a0bfb 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state @@ -27,14 +27,14 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) @@ -42,12 +42,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x85" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: false , msg: assertMessageOverflowNeg ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNeg , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 63 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x85" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: false , msg: assertMessageOverflowNeg ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNeg , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 63 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json index a7b2eb531..2b5c079a7 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json @@ -1 +1,2161 @@ -{"name":"assign_cast2","crate_id":2350940226393625358,"allocs":[],"functions":[[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[33,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h11453166664855b3E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h28b446e5bad970fcE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h7179fe126d65311fE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN12assign_cast24main17h62f0e7a858f55442E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":51,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[128,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":25,"id":9}}}}]},"span":51},{"kind":{"Assign":[{"local":2,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},2]}]},"span":52},{"kind":{"Assign":[{"local":3,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},26]}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},16]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},26]}]},"span":55},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},27]}]},"span":56},{"kind":{"Assign":[{"local":7,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},2]}]},"span":57},{"kind":{"Assign":[{"local":8,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},2]}]},"span":58},{"kind":{"Assign":[{"local":9,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},25]}]},"span":59},{"kind":{"Assign":[{"local":10,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},28]}]},"span":60},{"kind":{"Assign":[{"local":11,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},25]}]},"span":61},{"kind":{"Assign":[{"local":12,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},29]}]},"span":62},{"kind":{"Assign":[{"local":13,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},9]}]},"span":63},{"kind":{"Assign":[{"local":14,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},9]}]},"span":64},{"kind":{"Assign":[{"local":15,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":6,"projection":[]}},28]}]},"span":65}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"},{"ty":25,"span":67,"mutability":"Not"},{"ty":2,"span":68,"mutability":"Not"},{"ty":26,"span":69,"mutability":"Not"},{"ty":16,"span":70,"mutability":"Not"},{"ty":26,"span":71,"mutability":"Not"},{"ty":27,"span":72,"mutability":"Not"},{"ty":2,"span":73,"mutability":"Not"},{"ty":2,"span":74,"mutability":"Not"},{"ty":25,"span":75,"mutability":"Not"},{"ty":28,"span":76,"mutability":"Not"},{"ty":25,"span":77,"mutability":"Not"},{"ty":29,"span":78,"mutability":"Not"},{"ty":9,"span":79,"mutability":"Not"},{"ty":9,"span":80,"mutability":"Not"},{"ty":28,"span":81,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":68,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":69,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"d","source_info":{"span":70,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"e","source_info":{"span":71,"scope":5},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null},{"name":"f","source_info":{"span":72,"scope":6},"composite":null,"value":{"Place":{"local":6,"projection":[]}},"argument_index":null},{"name":"g","source_info":{"span":73,"scope":7},"composite":null,"value":{"Place":{"local":7,"projection":[]}},"argument_index":null},{"name":"h","source_info":{"span":74,"scope":8},"composite":null,"value":{"Place":{"local":8,"projection":[]}},"argument_index":null},{"name":"i","source_info":{"span":75,"scope":9},"composite":null,"value":{"Place":{"local":9,"projection":[]}},"argument_index":null},{"name":"j","source_info":{"span":76,"scope":10},"composite":null,"value":{"Place":{"local":10,"projection":[]}},"argument_index":null},{"name":"k","source_info":{"span":77,"scope":11},"composite":null,"value":{"Place":{"local":11,"projection":[]}},"argument_index":null},{"name":"l","source_info":{"span":78,"scope":12},"composite":null,"value":{"Place":{"local":12,"projection":[]}},"argument_index":null},{"name":"m","source_info":{"span":79,"scope":13},"composite":null,"value":{"Place":{"local":13,"projection":[]}},"argument_index":null},{"name":"n","source_info":{"span":80,"scope":14},"composite":null,"value":{"Place":{"local":14,"projection":[]}},"argument_index":null},{"name":"o","source_info":{"span":81,"scope":15},"composite":null,"value":{"Place":{"local":15,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[25,{"RigidTy":{"Uint":"U16"}}],[26,{"RigidTy":{"Int":"I16"}}],[28,{"RigidTy":{"Uint":"U32"}}],[29,{"RigidTy":{"Uint":"U64"}}],[27,{"RigidTy":{"Int":"I64"}}],[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file +{ + "name": "assign_cast", + "crate_id": 13002952174156868308, + "allocs": [], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE" + } + ], + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0a70c56a5c4492dfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN11assign_cast4main17ha51d0dbb589964c1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 9 + } + } + } + } + ] + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 27 + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 58 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 25 + ] + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 28 + ] + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + 25 + ] + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 29 + ] + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 64 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 28 + ] + } + ] + }, + "span": 65 + } + ], + "terminator": { + "kind": "Return", + "span": 50 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 67, + "mutability": "Not" + }, + { + "ty": 2, + "span": 68, + "mutability": "Not" + }, + { + "ty": 26, + "span": 69, + "mutability": "Not" + }, + { + "ty": 16, + "span": 70, + "mutability": "Not" + }, + { + "ty": 26, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 72, + "mutability": "Not" + }, + { + "ty": 2, + "span": 73, + "mutability": "Not" + }, + { + "ty": 2, + "span": 74, + "mutability": "Not" + }, + { + "ty": 25, + "span": 75, + "mutability": "Not" + }, + { + "ty": 28, + "span": 76, + "mutability": "Not" + }, + { + "ty": 25, + "span": 77, + "mutability": "Not" + }, + { + "ty": 29, + "span": 78, + "mutability": "Not" + }, + { + "ty": 9, + "span": 79, + "mutability": "Not" + }, + { + "ty": 9, + "span": 80, + "mutability": "Not" + }, + { + "ty": 28, + "span": 81, + "mutability": "Not" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 68, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 69, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 70, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 71, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 72, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "g", + "source_info": { + "span": 73, + "scope": 7 + }, + "composite": null, + "value": { + "Place": { + "local": 7, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "h", + "source_info": { + "span": 74, + "scope": 8 + }, + "composite": null, + "value": { + "Place": { + "local": 8, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "i", + "source_info": { + "span": 75, + "scope": 9 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "j", + "source_info": { + "span": 76, + "scope": 10 + }, + "composite": null, + "value": { + "Place": { + "local": 10, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "k", + "source_info": { + "span": 77, + "scope": 11 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "l", + "source_info": { + "span": 78, + "scope": 12 + }, + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "m", + "source_info": { + "span": 79, + "scope": 13 + }, + "composite": null, + "value": { + "Place": { + "local": 13, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "n", + "source_info": { + "span": 80, + "scope": 14 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "o", + "source_info": { + "span": 81, + "scope": 15 + }, + "composite": null, + "value": { + "Place": { + "local": 15, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 82 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hb5b25907048cfcaeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h5f5fa8aba711bbb4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 29, + { + "RigidTy": { + "Uint": "U64" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 28, + { + "RigidTy": { + "Uint": "U32" + } + } + ], + [ + 25, + { + "RigidTy": { + "Uint": "U16" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 27, + { + "RigidTy": { + "Int": "I64" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state index 356632fa5..326e8ac9e 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state @@ -25,34 +25,34 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state index d0916639e..fcae5e94d 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state @@ -25,25 +25,25 @@ unwindActionContinue - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state new file mode 100644 index 000000000..fcae5e94d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state @@ -0,0 +1,62 @@ + + + #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K + + + noReturn + + + ty ( 27 ) + + + + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) + + + ty ( 25 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + someBasicBlockIdx ( basicBlockIdx ( 1 ) ) + + + unwindActionContinue + + + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) ) ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) + ty ( 28 ) |-> rigidTyInt ( intTyI16 ) + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json index 7073dd042..0e8e20a56 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json @@ -1,1753 +1,1731 @@ { - "name": "main_a_b_with_int", - "crate_id": 9173310213495213748, - "allocs": [], - "functions": [ - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 32, - { - "NoOpSym": "" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" - } - ], - [ - 27, - { - "NormalSym": "_ZN17main_a_b_with_int1b17h92605682282418dbE" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" - } - ], - [ - 25, - { - "NormalSym": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" - } - ] + "name": "main_a_b_with_int", + "crate_id": 9173310213495213748, + "allocs": [], + "functions": [ + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN17main_a_b_with_int4main17h37f7f24b825d5c5dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" + } + ], + [ + 27, + { + "NormalSym": "_ZN17main_a_b_with_int1b17h92605682282418dbE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" + } + ], + [ + 29, + { + "NoOpSym": "" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" + } + ], + [ + 25, + { + "NormalSym": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 10 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 53 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 54, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 55 + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } } - ] + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 } - }, - "details": null - }, - { - "symbol_name": "_ZN17main_a_b_with_int1b17h92605682282418dbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "b", - "id": 8, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 65, - "mutability": "Not" - }, - { - "ty": 28, - "span": 66, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "_s", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "_t", - "source_info": { - "span": 66, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 67 + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - ] + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hfb4d01dc98c21e58E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int4main17h37f7f24b825d5c5dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 + }, + "ty": 26, + "id": 10 + } + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 53 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h96705bf254340eb7E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 54, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 55 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h343aa02f84d02209E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E", + "mono_item_kind": { + "MonoItemFn": { + "name": "a", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 11 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 11, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + }, + "ty": 28, + "id": 12 + } + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 58 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 59 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 61, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 62 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h96705bf254340eb7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int1b17h92605682282418dbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "b", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 65, + "mutability": "Not" + }, + { + "ty": 28, + "span": 66, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "_s", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "_t", + "source_info": { + "span": 66, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 67 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" + } }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + "ty": 17, + "id": 8 + } + } + } } - ] + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hfb4d01dc98c21e58E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + } + ] + ] } - ] + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "Downcast": 0 }, { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + "Field": [ + 0, + 6 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E", - "mono_item_kind": { - "MonoItemFn": { - "name": "a", - "id": 7, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 11 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 11, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 12 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 58 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 59 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "s", - "source_info": { - "span": 61, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "spread_arg": null, - "span": 62 + ] + } + } } - ] + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h343aa02f84d02209E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + "Move": { + "local": 3, + "projection": [] + } } - ] + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, { - "ty": 1, - "span": 48, - "mutability": "Not" + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 + ] + } + } } - ] + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } + }, + "details": null + } + ], + "types": [ + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } ], - "types": [ - [ - 28, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 26, - { - "RigidTy": { - "Uint": "Usize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ] + [ + 28, + { + "RigidTy": { + "Int": "I16" + } + } ], - "debug": null -} \ No newline at end of file + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Uint": "Usize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state index a1f32b1d1..0fc3fa20d 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state @@ -25,24 +25,24 @@ unwindActionContinue - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state index 17446d8ca..df42932d5 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state @@ -26,22 +26,22 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json index 9d40edd0d..ebdb4e0d4 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json @@ -1 +1,1659 @@ -{"name":"main_a_b_c","crate_id":2129868149476588123,"allocs":[],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E"}],[20,{"IntrinsicSym":"black_box"}],[27,{"NormalSym":"_ZN10main_a_b_c1c17h59101d2318335bbdE"}],[25,{"NormalSym":"_ZN10main_a_b_c1a17hf96e7944faad0bd0E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[26,{"NormalSym":"_ZN10main_a_b_c1b17hbedf65f2538ce3adE"}],[31,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start17he509fe31442a28c4E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1b17hbedf65f2538ce3adE","mono_item_kind":{"MonoItemFn":{"name":"b","id":8,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":27,"id":11}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":61}},{"statements":[],"terminator":{"kind":"Return","span":62}}],"locals":[{"ty":1,"span":63,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":64}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c4main17hcaca459da1b06b9fE","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":51}},{"statements":[],"terminator":{"kind":"Return","span":52}}],"locals":[{"ty":1,"span":53,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":54}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1a17hf96e7944faad0bd0E","mono_item_kind":{"MonoItemFn":{"name":"a","id":7,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":55,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":10}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":56}},{"statements":[],"terminator":{"kind":"Return","span":57}}],"locals":[{"ty":1,"span":58,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":59}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1c17h59101d2318335bbdE","mono_item_kind":{"MonoItemFn":{"name":"c","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":67}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file +{ + "name": "main_a_b_c", + "crate_id": 2129868149476588123, + "allocs": [], + "functions": [ + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE" + } + ], + [ + 25, + { + "NormalSym": "_ZN10main_a_b_c1a17hf96e7944faad0bd0E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E" + } + ], + [ + 31, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 27, + { + "NormalSym": "_ZN10main_a_b_c1c17h59101d2318335bbdE" + } + ], + [ + 26, + { + "NormalSym": "_ZN10main_a_b_c1b17hbedf65f2538ce3adE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN10main_a_b_c1c17h59101d2318335bbdE", + "mono_item_kind": { + "MonoItemFn": { + "name": "c", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 66, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 67 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10main_a_b_c4main17hcaca459da1b06b9fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 52 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 53, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 54 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17he509fe31442a28c4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10main_a_b_c1a17hf96e7944faad0bd0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "a", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 10 + } + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 57 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 58, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 59 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10main_a_b_c1b17hbedf65f2538ce3adE", + "mono_item_kind": { + "MonoItemFn": { + "name": "b", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 11 + } + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 63, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json index 0b911681f..804577cd2 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json @@ -84,12 +84,6 @@ ] ], "functions": [ - [ - 31, - { - "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E" - } - ], [ 0, { @@ -103,51 +97,51 @@ } ], [ - 23, + 14, { - "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E" } ], [ - 32, + 20, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "IntrinsicSym": "black_box" } ], [ - 26, + 32, { - "NormalSym": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 35, + 19, { - "NoOpSym": "" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E" } ], [ - 14, + 31, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E" + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E" } ], [ - 19, + 37, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E" + "NoOpSym": "" } ], [ - 20, + 26, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E" } ], [ - 27, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E" + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE" } ], [ @@ -155,2497 +149,2479 @@ { "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E" } + ], + [ + 27, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E" + } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE", + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E", "mono_item_kind": { "MonoItemFn": { - "name": "std::cmp::impls::::eq", + "name": "std::cmp::impls::::eq", "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] } } - ] - }, - "span": 54 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 55 - } - ], - "terminator": { + "span": 54 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 7 - } - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + } + ] }, - "span": 53 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 + "span": 55 } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 } - ], - "locals": [ - { - "ty": 21, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 25, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 58, + "mutability": "Not" + }, + { + "ty": 24, + "span": 59, + "mutability": "Not" + }, + { + "ty": 25, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { "span": 58, - "mutability": "Not" - }, - { - "ty": 25, - "span": 59, - "mutability": "Not" + "scope": 0 }, - { - "ty": 22, - "span": 58, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 22, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { "span": 59, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 58, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "scope": 0 }, - { - "name": "other", - "source_info": { - "span": 59, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 60 - } - ] + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 29, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } + "StorageLive": 2 }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { + "span": 16 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageLive": 3 }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 - } - }, - { - "statements": [], - "terminator": { + "span": 15 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, "projection": [] }, - "target": 4, - "unwind": "Terminate" - } + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 61 + "span": 17 } - } - ], - "locals": [ - { - "ty": 16, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - }, - { - "ty": 30, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 10 - } - } - } } - ] + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 64 - } - ], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 66, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 66, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 15 } - ], - "spread_arg": null, - "span": 67 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::cmp::impls::::eq", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 44 + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - { - "kind": { - "Assign": [ - { + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { "local": 3, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 44 + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 }, - { - "kind": { - "StorageLive": 4 - }, - "span": 45 + "span": 21 + }, + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - } - ] - }, - "span": 45 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] } - } - ] + ] + } } - ] - }, - "span": 46 + } + ] }, - { - "kind": { - "StorageDead": 4 - }, - "span": 47 + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] }, - { - "kind": { - "StorageDead": 3 - }, - "span": 47 - } - ], - "terminator": { - "kind": "Return", - "span": 43 + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "locals": [ - { - "ty": 21, - "span": 48, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 49, - "mutability": "Not" - }, - { - "ty": 22, - "span": 50, - "mutability": "Not" + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } }, - { - "ty": 2, - "span": 44, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 2, - "span": 45, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 49, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "name": "other", - "source_info": { - "span": 50, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 51 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E", + "symbol_name": "_ZN3std2rt10lang_start17h00fbe264978df755E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ { - "Field": [ - 0, - 7 - ] + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { + ] + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 3, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 15 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } + "args": [ + { + "Move": { + "local": 6, + "projection": [] } }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + { + "Move": { + "local": 2, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + { + "Move": { + "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + }, + { + "Move": { + "local": 4, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } } - ] + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] } - }, - 16 - ] + ] + } } - ] - }, - "span": 24 + } + ] }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN9doubleRef4main17h95ea92da4b4a3e96E", + "symbol_name": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 - } - } - } - } - ] - }, - "span": 69 + "name": "std::cmp::impls::::eq", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] + "span": 44 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } } - ] - }, - "span": 70 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [] - } - ] - } - ] - }, - "span": 71 + "span": 44 + }, + { + "kind": { + "StorageLive": 4 }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CopyForDeref": { - "local": 3, + "span": 45 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, "projection": [ "Deref" ] } } - ] - }, - "span": 72 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 13, - "projection": [ - "Deref" - ] + "span": 45 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } - } - ] - }, - "span": 72 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 68 - } - ], - "terminator": { + "span": 46 + }, + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } + "StorageDead": 4 + }, + "span": 47 + }, + { + "kind": { + "StorageDead": 3 + }, + "span": 47 + } + ], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 48, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 49, + "mutability": "Not" + }, + { + "ty": 22, + "span": 50, + "mutability": "Not" + }, + { + "ty": 2, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 45, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 49, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 50, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 51 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - } + ] }, - "span": 68 + "span": 61 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 3, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + }, + { + "ty": 30, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h484e2183c4c007e2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 8 } - ] + } }, - "span": 75 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 11, - "projection": [] - } + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" ] } - ] - }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 9, + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 10, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 76 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::eq", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 73, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 12 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Move": { - "local": 9, - "projection": [] + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] } } - ], - "destination": { - "local": 7, - "projection": [] - }, - "target": 3, - "unwind": "Continue" - } + } + ] }, - "span": 73 - } - }, - { - "statements": [], - "terminator": { + "span": 54 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 77, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 33, - "id": 14 - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] } } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 77 + "span": 55 } - }, - { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 7 + } + } + }, + "args": [ + { "Move": { - "local": 7, + "local": 3, "projection": [] } }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 4 + { + "Move": { + "local": 4, + "projection": [] + } } - } - }, - "span": 73 + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 58, + "mutability": "Not" + }, + { + "ty": 25, + "span": 59, + "mutability": "Not" + }, + { + "ty": 22, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 58, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 59, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } }, - { - "statements": [], - "terminator": { + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 60 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 64, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 33, - "id": 15 + "ty": 17, + "id": 10 } } } - ], - "destination": { - "local": 12, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 79 + "span": 64 } + ], + "terminator": { + "kind": "Return", + "span": 63 } - ], - "locals": [ - { - "ty": 1, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 81, - "mutability": "Not" - }, - { - "ty": 22, - "span": 82, - "mutability": "Not" - }, - { - "ty": 25, - "span": 83, - "mutability": "Not" - }, - { - "ty": 21, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 34, - "span": 77, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 76, - "mutability": "Not" - }, - { - "ty": 22, - "span": 75, - "mutability": "Not" - }, - { - "ty": 34, - "span": 79, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 83, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 81, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "y", - "source_info": { - "span": 82, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 83, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] + } + ], + "locals": [ + { + "ty": 17, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 66, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 66, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 84 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h7861fc27b244f735E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 } - } - ], - "locals": [ - { - "ty": 1, - "span": 62, - "mutability": "Mut" }, - { - "ty": 28, - "span": 62, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 62 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 67 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17h00fbe264978df755E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 } - ] + } }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 1, "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { "Constant": { - "span": 0, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 0, - "id": 0 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 7 + "target": 2, + "unwind": "Unreachable" } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + }, + "span": 35 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 4 + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E", + "symbol_name": "_ZN9doubleRef4main17h95ea92da4b4a3e96E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "Assign": [ + { + "local": 1, + "projection": [] }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { + { + "Use": { "Constant": { - "span": 32, + "span": 69, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 11 } } } - ], - "destination": { - "local": 0, + } + ] + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 2, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 70 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [] } - } - ], - "destination": { - "local": 2, + ] + } + ] + }, + "span": 71 + }, + { + "kind": { + "Assign": [ + { + "local": 13, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } + { + "CopyForDeref": { + "local": 3, + "projection": [ + "Deref" + ] + } + } + ] }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + "span": 72 }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 13, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 72 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 68 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 } } }, - "argument_index": 1 + "span": 68 } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h484e2183c4c007e2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 8 + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 3, + "projection": [] } - } + ] + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] }, - "args": [ - { - "Move": { + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, "projection": [] } - } - ], - "destination": { - "local": 0, + ] + } + ] + }, + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 10, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 11, + "projection": [] + } + ] + } + ] }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "span": 76 + }, + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, + "Assign": [ + { + "local": 9, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 10, + "projection": [] + } + ] + } + ] }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 + "span": 76 } - } - ], - "locals": [ - { - "ty": 1, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::cmp::impls::::eq", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 12 } - ] + } }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 4, + "args": [ + { + "Move": { + "local": 8, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } } - ] + }, + { + "Move": { + "local": 9, + "projection": [] + } + } + ], + "destination": { + "local": 7, + "projection": [] }, - "span": 55 + "target": 3, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + "span": 73 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 77, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { "Constant": { - "span": 52, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 33, + "id": 14 } } - ], - "destination": { - "local": 0, + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, "projection": [] - }, - "target": 1, - "unwind": "Continue" + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 } - }, - "span": 53 - } + } + }, + "span": 73 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 33, + "id": 15 + } + } + } + ], + "destination": { + "local": 12, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 79 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 81, + "mutability": "Not" + }, + { + "ty": 22, + "span": 82, + "mutability": "Not" + }, + { + "ty": 25, + "span": 83, + "mutability": "Not" + }, + { + "ty": 21, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 34, + "span": 77, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 76, + "mutability": "Not" + }, + { + "ty": 22, + "span": 75, + "mutability": "Not" + }, + { + "ty": 34, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 83, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 81, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 21, - "span": 57, - "mutability": "Mut" }, - { - "ty": 24, - "span": 58, - "mutability": "Not" + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 82, + "scope": 2 }, - { - "ty": 24, - "span": 59, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 25, - "span": 58, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 83, + "scope": 3 }, - { - "ty": 25, - "span": 59, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 58, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "name": "other", - "source_info": { - "span": 59, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h7861fc27b244f735E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 } - ], - "spread_arg": null, - "span": 60 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 62, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 62 + } } }, "details": null @@ -2653,18 +2629,16 @@ ], "types": [ [ - 9, + 21, { - "RigidTy": { - "Uint": "U8" - } + "RigidTy": "Bool" } ], [ - 6, + 2, { "RigidTy": { - "Int": "Isize" + "Int": "I8" } } ], @@ -2677,16 +2651,18 @@ } ], [ - 21, + 9, { - "RigidTy": "Bool" + "RigidTy": { + "Uint": "U8" + } } ], [ - 2, + 6, { "RigidTy": { - "Int": "I8" + "Int": "Isize" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state index 473de3a2a..ad32c52d7 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -30,35 +30,35 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) - ty ( 29 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) ) ) + ty ( 29 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json index c0bd3bf34..472f5fc06 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json @@ -3,7 +3,7 @@ "crate_id": 4352655527695101489, "allocs": [ [ - 2, + 3, { "Memory": { "bytes": [ @@ -30,7 +30,7 @@ 61, 61, 32, - 51, + 50, 50 ], "provenance": { @@ -42,7 +42,7 @@ } ], [ - 3, + 2, { "Memory": { "bytes": [ @@ -69,7 +69,7 @@ 61, 61, 32, - 50, + 51, 50 ], "provenance": { @@ -89,33 +89,33 @@ } ], [ - 26, + 13, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E" } ], [ - 19, + 26, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 13, + 21, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE" } ], [ - 35, + 19, { - "NoOpSym": "" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E" } ], [ - 23, + 35, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E" + "NoOpSym": "" } ], [ @@ -125,9 +125,9 @@ } ], [ - 21, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E" } ], [ @@ -146,275 +146,447 @@ "uneval_consts": [], "items": [ { - "symbol_name": "_ZN10mutableRef1f17h63ad688e5733c791E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E", "mono_item_kind": { "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 15 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - } + ] } } - ] - }, - "span": 70 - } - ], - "terminator": { - "kind": "Return", - "span": 68 + } + ] + }, + "span": 17 } - } - ], - "locals": [ - { - "ty": 1, - "span": 71, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "y", - "source_info": { - "span": 72, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 15 } - ], - "spread_arg": null, - "span": 73 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } - ], - "destination": { - "local": 0, + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 22 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { - "local": 2, + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 }, - "span": 35 + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" }, - { - "ty": 7, - "span": 38, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h8964be79673df687E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 42 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -425,1372 +597,1317 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + }, + [ { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 + } ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 5, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 1 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 6, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 6 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { "span": 9, - "mutability": "Not" + "scope": 0 }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 9, - "span": 12, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN10mutableRef4main17h93ec5d833ede8e5dE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 - } - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 32, - 2 - ] - ], - "otherwise": 3 } - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 22 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 - } - } - } - } - ] + "args": [], + "destination": { + "local": 0, + "projection": [] }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "span": 60 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 22, - 4 - ] - ], - "otherwise": 5 - } - } - }, - "span": 56 - } - }, - { - "statements": [], - "terminator": { + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 12 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 46, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 25, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 13 + "ty": 17, + "id": 8 } } } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 61 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - { - "statements": [], - "terminator": { + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10mutableRef1f17h63ad688e5733c791E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 12 - } - } + "Assign": [ + { + "local": 1, + "projection": [ + "Deref" + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 69, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 25, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 32 ], "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 14 + "ty": 2, + "id": 15 } } } - ], - "destination": { - "local": 8, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 63 + "span": 70 } + ], + "terminator": { + "kind": "Return", + "span": 68 } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 51, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 55, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 66, - "mutability": "Not" - }, - { - "ty": 2, - "span": 60, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 1, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 72, + "scope": 0 }, - { - "ty": 29, - "span": 63, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 65, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "name": "xref", - "source_info": { - "span": 66, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 67 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { "Move": { "local": 1, "projection": [] } }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hca02380bc74841bfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E", + "symbol_name": "_ZN10mutableRef4main17h93ec5d833ede8e5dE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ] + }, + "ty": 2, + "id": 10 } } } - ] - }, - "span": 17 - } - ], - "terminator": { + } + ] + }, + "span": 52 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 3, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] }, - "span": 15 + "span": 53 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 19 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 51 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, + { + "Use": { + "Copy": { + "local": 1, "projection": [] } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + } + ] }, - "span": 16 + "span": 55 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] + "targets": { + "branches": [ + [ + 32, + 2 + ] + ], + "otherwise": 3 + } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 + }, + { + "local": 1, + "projection": [] + } + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 22 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ] + }, + "ty": 2, + "id": 11 } } } - ] - }, - "span": 23 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + } + ] }, - { - "kind": { - "StorageDead": 2 + "span": 60 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } }, - "span": 27 + "targets": { + "branches": [ + [ + 22, + 4 + ] + ], + "otherwise": 5 + } } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } + }, + "args": [ { - "Field": [ - 0, - 7 - ] + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 13 + } + } } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 61 } - ], - "spread_arg": null, - "span": 3 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h8964be79673df687E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } + }, + "args": [ + { "Constant": { - "span": 43, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 14 } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } + } + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 66, + "mutability": "Not" + }, + { + "ty": 2, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 63, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "xref", + "source_info": { + "span": 66, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 67 + } } }, "details": null @@ -1801,290 +1918,153 @@ "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 + ] } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + ] }, "span": 43 } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 46 + "target": 1, + "unwind": { + "Cleanup": 3 + } } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 } - ], - "spread_arg": null, - "span": 49 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hca02380bc74841bfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -2100,26 +2080,26 @@ } ], [ - 6, + 9, { "RigidTy": { - "Int": "Isize" + "Uint": "U8" } } ], [ - 16, + 6, { "RigidTy": { - "Int": "I32" + "Int": "Isize" } } ], [ - 9, + 16, { "RigidTy": { - "Uint": "U8" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state index 62b92a680..0ad6465cc 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -30,28 +30,28 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityMut ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) .Map @@ -65,5 +65,4 @@ ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) ty ( 16 ) |-> rigidTyInt ( intTyI32 ) - - + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json index 917211b8f..25e36621b 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json @@ -43,21 +43,9 @@ ], "functions": [ [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E" - } - ], - [ - 31, - { - "NoOpSym": "" - } - ], - [ - 26, + 25, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN8refAsArg1f17h5a492bff7ee056a4E" } ], [ @@ -67,9 +55,9 @@ } ], [ - 13, + 0, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ @@ -79,15 +67,21 @@ } ], [ - 25, + 23, { - "NormalSym": "_ZN8refAsArg1f17h5a492bff7ee056a4E" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E" } ], [ - 0, + 13, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E" + } + ], + [ + 34, + { + "NoOpSym": "" } ], [ @@ -101,1744 +95,1730 @@ { "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE" } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E", + "symbol_name": "_ZN3std2rt10lang_start17hb0648255f9b804cbE", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ { - "Mut": { - "kind": "Default" + "Copy": { + "local": 1, + "projection": [] } - }, - { - "local": 1, - "projection": [] } ] - } - ] - }, - "span": 43 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 0, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": { - "Cleanup": 3 + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] } - } + ] }, - "span": 43 + "span": 2 } - }, - { - "statements": [], - "terminator": { + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { "kind": { - "Drop": { - "place": { - "local": 1, + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] }, - "target": 2, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - "span": 43 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN8refAsArg4main17h0353e8a47bed147aE", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 - } + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 } } } - ] - }, - "span": 52 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 53 + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 55 } }, - { - "statements": [], - "terminator": { + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN8refAsArg4main17h0353e8a47bed147aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 - } - } + "Assign": [ + { + "local": 1, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 52, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 42 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 12 + "ty": 2, + "id": 10 } } } - ], - "destination": { - "local": 5, + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] }, - "target": null, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] }, - "span": 56 + "span": 53 } - } - ], - "locals": [ - { - "ty": 1, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 58, - "mutability": "Not" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Not" - }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 58, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": null + "span": 51 } - ], - "spread_arg": null, - "span": 60 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, + "Assign": [ + { + "local": 4, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] }, - "span": 43 + "span": 54 } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 56 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h466a9b165e00f7ddE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE", + "symbol_name": "_ZN8refAsArg1f17h5a492bff7ee056a4E", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] } } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + } + ] + }, + "span": 62 } + ], + "terminator": { + "kind": "Return", + "span": 61 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 2, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 64, + "scope": 0 }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - ] + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 65 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17hb0648255f9b804cbE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 16 + }, + { + "kind": { + "StorageLive": 3 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 15 + }, + { + "kind": { + "StorageLive": 4 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } ] - ] + } } - ] - }, - "span": 3 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 } - ] + } }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] } - ] + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 2 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 15 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageDead": 4 }, - "span": 1 + "span": 19 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + } }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN8refAsArg1f17h5a492bff7ee056a4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 62 - } - ], - "terminator": { - "kind": "Return", - "span": 61 - } - } - ], - "locals": [ - { - "ty": 2, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "y", - "source_info": { - "span": 64, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "target": 2, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 16 } - ], - "spread_arg": null, - "span": 65 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageDead": 3 }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 21 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 + "span": 22 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + { + "kind": { + "StorageLive": 6 + }, + "span": 23 }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb11b6a9b578c8caaE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Move": { - "local": 1, + { + "Use": { + "Copy": { + "local": 2, "projection": [ - "Deref" + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } ] } - }, - { - "Move": { - "local": 2, - "projection": [] - } } - ], - "destination": { + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] }, - "span": 43 + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h466a9b165e00f7ddE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, + "args": [ + { + "Move": { + "local": 1, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { "Constant": { - "span": 14, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 19 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { "Constant": { - "span": 18, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 14, - "id": 2 + "ty": 1, + "id": 4 } } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + ] + } + ] }, - "span": 16 + "span": 43 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + } }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] }, - "span": 27 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 20 - } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb11b6a9b578c8caaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "Field": [ - 0, - 7 - ] + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 3 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -1846,19 +1826,13 @@ ], "types": [ [ - 2, + 6, { "RigidTy": { - "Int": "I8" + "Int": "Isize" } } ], - [ - 29, - { - "RigidTy": "Bool" - } - ], [ 16, { @@ -1868,20 +1842,26 @@ } ], [ - 6, + 9, { "RigidTy": { - "Int": "Isize" + "Uint": "U8" } } ], [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } + ], + [ + 29, + { + "RigidTy": "Bool" + } ] ], "debug": null diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state index 298d04c3e..d1a910bb1 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -28,25 +28,25 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json index b1465fb81..d9dfaae97 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json @@ -43,15 +43,9 @@ ], "functions": [ [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E" - } - ], - [ - 21, + 20, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE" + "IntrinsicSym": "black_box" } ], [ @@ -61,15 +55,15 @@ } ], [ - 0, + 26, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 25, + 21, { - "NormalSym": "_ZN9refAsArg21f17h3824ba4b7ccb016dE" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE" } ], [ @@ -79,15 +73,21 @@ } ], [ - 20, + 25, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN9refAsArg21f17h3824ba4b7ccb016dE" } ], [ - 26, + 14, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E" } ], [ @@ -103,1478 +103,1421 @@ } ], [ - 19, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hd928bd1477e89e88E", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } } }, "details": null }, { - "symbol_name": "_ZN9refAsArg21g17h9b15e23b800227b9E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E", "mono_item_kind": { "MonoItemFn": { - "name": "g", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } - } - ] + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } }, - "span": 68 - } - ], - "terminator": { - "kind": "Return", - "span": 67 - } - } - ], - "locals": [ - { - "ty": 2, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 70, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 71 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hd928bd1477e89e88E", "mono_item_kind": { "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" ] } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 43 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { "Constant": { - "span": 43, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 23, - "id": 7 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN9refAsArg24main17hb3acdb099b5ffc5aE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - } + ] } } - ] - }, - "span": 52 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 53 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 15 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageDead": 4 }, - "span": 51 + "span": 19 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - ] + } }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { + "args": [ + { "Move": { - "local": 4, + "local": 3, "projection": [] } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 } - } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 55 - } - }, - { - "statements": [], - "terminator": { + "span": 21 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, - "ty": 27, - "id": 12 - } + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { - "local": 5, + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] }, - "target": null, - "unwind": "Continue" - } + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 }, - "span": 56 + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "locals": [ - { - "ty": 1, - "span": 57, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "ty": 2, - "span": 58, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } }, - { - "ty": 2, - "span": 59, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 28, - "span": 53, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 }, - { - "ty": 30, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 58, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 60 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E", + "symbol_name": "_ZN9refAsArg21g17h9b15e23b800227b9E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "g", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 68 } + ], + "terminator": { + "kind": "Return", + "span": 67 } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + } + ], + "locals": [ + { + "ty": 2, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 70, + "scope": 0 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h3f415fb1ec534b7eE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 71 + } } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, "projection": [] } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + ] + } + ] }, - "span": 33 + "span": 43 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Unreachable" + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] } }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" } }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" } }, - "argument_index": 1 + "span": 43 } - ], - "spread_arg": null, - "span": 42 - } - ] + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E", + "symbol_name": "_ZN9refAsArg21f17h3824ba4b7ccb016dE", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 46 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 } - ], - "spread_arg": null, - "span": 49 - } - ] + } + ], + "locals": [ + { + "ty": 2, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 66 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E", + "symbol_name": "_ZN9refAsArg24main17hb3acdb099b5ffc5aE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ] + }, + "ty": 2, + "id": 10 } } } - ] - }, - "span": 17 - } - ], - "terminator": { + } + ] + }, + "span": 52 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 3, "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + ] + } + ] }, - "span": 16 + "span": 53 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + "args": [ + { + "Copy": { + "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { "Copy": { "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + ] + } + ] }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 54 } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ 0, - 7 + 3 ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + ], + "otherwise": 2 + } } }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN9refAsArg21f17h3824ba4b7ccb016dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { "Constant": { - "span": 61, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 13 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 62 + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 56 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } - } - ], - "locals": [ - { - "ty": 2, - "span": 64, - "mutability": "Mut" }, - { - "ty": 28, - "span": 65, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 66 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null @@ -1585,356 +1528,391 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + }, + [ { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 + } ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 5, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 1 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 6, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 6 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" + "scope": 0 }, - { - "ty": 8, - "span": 11, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 9, - "span": 12, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h3f415fb1ec534b7eE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "spread_arg": null, - "span": 13 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null @@ -1942,10 +1920,10 @@ ], "types": [ [ - 2, + 9, { "RigidTy": { - "Int": "I8" + "Uint": "U8" } } ], @@ -1972,10 +1950,10 @@ } ], [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state index 8e72e0025..3efc8ebed 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -28,26 +28,26 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json index 15fb2e973..4e7ec8790 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json @@ -43,33 +43,27 @@ ], "functions": [ [ - 25, - { - "NormalSym": "_ZN11refReturned1f17hec238a45891f1867E" - } - ], - [ - 23, + 13, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE" } ], [ - 0, + 25, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN11refReturned1f17hec238a45891f1867E" } ], [ - 21, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E" } ], [ - 26, + 20, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "IntrinsicSym": "black_box" } ], [ @@ -79,21 +73,21 @@ } ], [ - 19, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 13, + 19, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E" } ], [ - 20, + 21, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE" } ], [ @@ -107,692 +101,1066 @@ { "NoOpSym": "" } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - }, - { - "local": 1, - "projection": [] - } - ] + ] + } } - ] + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 43 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 15 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - }, - { - "Move": { + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { "local": 2, - "projection": [] + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": { - "Cleanup": 3 + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] } - } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 24 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageDead": 6 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - }, - "span": 43 + ] } }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN11refReturned4main17haf3da80612a1db31E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { "local": 1, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 - } - } + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ] + } }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + "args": [ + { "Constant": { - "span": 50, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 54 + "target": 2, + "unwind": "Unreachable" } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } - } - }, - "span": 54 + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - { - "statements": [], - "terminator": { + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 46, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 12 + "ty": 17, + "id": 8 } } } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 57 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 1, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 60, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Not" - }, - { - "ty": 2, - "span": 61, - "mutability": "Not" - }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "ty": 30, - "span": 57, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 59, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": null + } }, - { - "name": "y", - "source_info": { - "span": 60, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned1f17hec238a45891f1867E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": null + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 28, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 67, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 67, + "scope": 0 }, - { - "name": "z", - "source_info": { - "span": 61, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h2966f97234df1366E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "spread_arg": null, - "span": 62 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN11refReturned1f17hec238a45891f1867E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE", "mono_item_kind": { "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 13 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Copy": { + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, "projection": [] } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } - ], - "destination": { - "local": 0, - "projection": [] }, - "target": 1, - "unwind": "Continue" + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 28, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 67, - "mutability": "Not" + } + }, + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 67, - "scope": 0 + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - ], - "spread_arg": null, - "span": 68 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h54c9713c41194453E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "name": ">::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned1g17h1f19f83ec6e6cf29E", + "mono_item_kind": { + "MonoItemFn": { + "name": "g", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { - "Move": { + { + "Use": { + "Copy": { "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, "projection": [] } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 70 } + ], + "terminator": { + "kind": "Return", + "span": 69 } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 28, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 72, + "scope": 0 }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } } }, "details": null @@ -803,1177 +1171,787 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, + "Assign": [ + { + "local": 8, "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ + { + "Aggregate": [ + { + "Closure": [ + 1, + [ { - "Downcast": 0 + "Type": 1 }, { - "Field": [ - 0, - 6 - ] + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + ] + ] + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + "span": 3 }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 1, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + ] + } + ] }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 2 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN11refReturned1g17h1f19f83ec6e6cf29E", - "mono_item_kind": { - "MonoItemFn": { - "name": "g", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { "Copy": { - "local": 1, + "local": 7, "projection": [] } - } - } - ] - }, - "span": 70 - } - ], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 28, - "span": 71, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 72, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 73 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h2966f97234df1366E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + }, + 5 + ] + } + ] }, - "span": 15 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } + "args": [ + { + "Move": { + "local": 6, + "projection": [] } }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + { + "Move": { + "local": 2, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + { + "Move": { + "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } + }, + { + "Move": { + "local": 4, + "projection": [] } - ] + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] } - }, - 16 - ] + ] + } } - ] - }, - "span": 24 + } + ] }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h54c9713c41194453E", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 } - ], - "spread_arg": null, - "span": 49 - } - ] + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E", + "symbol_name": "_ZN11refReturned4main17haf3da80612a1db31E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, "projection": [] } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [], - "destination": { - "local": 0, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] }, - "span": 43 + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 57 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 60, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 2, + "span": 61, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 57, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 59, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 60, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 61, + "scope": 3 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 62 + } } }, "details": null @@ -1981,40 +1959,40 @@ ], "types": [ [ - 29, + 6, { - "RigidTy": "Bool" + "RigidTy": { + "Int": "Isize" + } } ], [ - 16, + 29, { - "RigidTy": { - "Int": "I32" - } + "RigidTy": "Bool" } ], [ - 2, + 9, { "RigidTy": { - "Int": "I8" + "Uint": "U8" } } ], [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } ], [ - 6, + 16, { "RigidTy": { - "Int": "Isize" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state index 8ffbb7679..2eee4c407 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -28,27 +28,27 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json index d0219c989..8e9ce0e20 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json @@ -43,33 +43,33 @@ ], "functions": [ [ - 20, + 21, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E" } ], [ - 19, + 25, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 21, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E" } ], [ - 13, + 20, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E" + "IntrinsicSym": "black_box" } ], [ - 30, + 0, { - "NoOpSym": "" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ @@ -79,1683 +79,1665 @@ } ], [ - 0, + 30, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NoOpSym": "" } ], [ - 25, + 19, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E" } ], [ - 23, + 13, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0e8fcda8fbc4c3b7E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E", "mono_item_kind": { "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, "projection": [] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + ] + } + ] }, "span": 43 } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] }, - "span": 46 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 45 - } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - ], - "spread_arg": null, - "span": 49 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { + { + "Use": { + "Copy": { "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + } + ] }, - "span": 33 + "span": 17 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 15 } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 43 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 16 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } + "StorageDead": 3 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 21 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageLive": 5 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 22 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 4, - "unwind": "Terminate" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] }, - "span": 43 + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN6simple4main17hcc17a5a2c5cebe39E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 9 - } - } - } - } - ] - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] + "args": [], + "destination": { + "local": 0, + "projection": [] }, - "span": 50 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 50 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 54 - } - }, - { - "statements": [], - "terminator": { + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 10 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 46, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 26, - "id": 11 + "ty": 17, + "id": 8 } } } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 55 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 1, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 57, - "mutability": "Not" - }, - { - "ty": 27, - "span": 58, - "mutability": "Not" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 55, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 57, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "name": "y", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": null + } }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8b592859fcbe523aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "spread_arg": null, - "span": 60 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E", + "symbol_name": "_ZN6simple4main17hcc17a5a2c5cebe39E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 + } + } } + } + ] + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] }, - "args": [], - "destination": { - "local": 0, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] }, - "span": 43 + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 50 } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 50 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 10 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 55 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 57, + "mutability": "Not" + }, + { + "ty": 27, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 55, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 57, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 58, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E", + "symbol_name": "_ZN3std2rt10lang_start17hc7c2da63cbb13d2eE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ { - "Field": [ - 0, - 7 - ] + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { + ] + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 3, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 15 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } + "args": [ + { + "Move": { + "local": 6, + "projection": [] } }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + { + "Move": { + "local": 2, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] + { + "Move": { + "local": 3, + "projection": [] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + }, + { + "Move": { + "local": 4, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } } - ] + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] } - }, - 16 - ] + ] + } } - ] - }, - "span": 24 + } + ] }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17hc7c2da63cbb13d2eE", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 } - ] + } }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 1, "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { "Constant": { - "span": 0, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 0, - "id": 0 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 7 + "target": 2, + "unwind": "Unreachable" } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + }, + "span": 35 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 4 + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8b592859fcbe523aE", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0e8fcda8fbc4c3b7E", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -1763,10 +1745,10 @@ ], "types": [ [ - 16, + 2, { "RigidTy": { - "Int": "I32" + "Int": "I8" } } ], @@ -1793,10 +1775,10 @@ } ], [ - 2, + 16, { "RigidTy": { - "Int": "I8" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.state b/kmir/src/tests/integration/data/exec-smir/references/simple.state index 8fcbeaeb2..760bb9fc5 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.state +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -27,24 +27,24 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json index 742906ea4..f19b57050 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json @@ -3,7 +3,7 @@ "crate_id": 16077360951361859512, "allocs": [ [ - 9, + 8, { "Memory": { "bytes": [ @@ -28,18 +28,12 @@ 97, 46, 97, - 95, + 110, + 111, 116, 104, - 105, - 114, - 100, - 32, - 61, - 61, - 32, - 52, - 51 + 101, + 114 ], "provenance": { "ptrs": [] @@ -90,7 +84,7 @@ } ], [ - 6, + 5, { "Memory": { "bytes": [ @@ -126,7 +120,7 @@ 61, 32, 52, - 51 + 50 ], "provenance": { "ptrs": [] @@ -137,7 +131,7 @@ } ], [ - 5, + 9, { "Memory": { "bytes": [ @@ -163,17 +157,17 @@ 46, 97, 95, - 118, - 97, - 108, - 117, - 101, + 116, + 104, + 105, + 114, + 100, 32, 61, 61, 32, 52, - 50 + 51 ], "provenance": { "ptrs": [] @@ -184,7 +178,7 @@ } ], [ - 8, + 6, { "Memory": { "bytes": [ @@ -209,12 +203,18 @@ 97, 46, 97, - 110, - 111, - 116, - 104, + 95, + 118, + 97, + 108, + 117, 101, - 114 + 32, + 61, + 61, + 32, + 52, + 51 ], "provenance": { "ptrs": [] @@ -227,9 +227,9 @@ ], "functions": [ [ - 21, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ @@ -239,229 +239,140 @@ } ], [ - 23, + 20, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E" + "IntrinsicSym": "black_box" } ], [ - 27, + 14, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E" } ], [ - 44, + 23, { - "NoOpSym": "" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E" } ], [ - 19, + 44, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E" + "NoOpSym": "" } ], [ - 0, + 21, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE" } ], [ - 14, + 27, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 20, + 19, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ea78c58d6db9c2E", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 } } } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + } + ] + }, + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - ] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } } }, "details": null @@ -472,1496 +383,1494 @@ "MonoItemFn": { "name": "main", "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Aggregate": [ + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 9 - } - } - }, - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 10 - } - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 } } - ] - ] - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" }, { - "Mut": { - "kind": "Default" + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 10 + } } }, { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 } - ] + } } ] - } - ] - }, - "span": 55 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 12 - } + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } + }, + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] } - } - ] - }, - "span": 57 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 58 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 42, - 1 - ] - ], - "otherwise": 2 - } - } - }, - "span": 50 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - ] - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 5, - "projection": [] - } - ] - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 20, - "projection": [] - }, - { - "CopyForDeref": { - "local": 6, - "projection": [ - "Deref" - ] - } - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 20, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 43 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 43, - 3 - ] - ], - "otherwise": 4 - } - } - }, - "span": 59 - } - }, - { - "statements": [], - "terminator": { + "span": 55 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 65, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 - } - } + "Assign": [ + { + "local": 2, + "projection": [ + "Deref" + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 56, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 42 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 28, - "id": 15 + "ty": 2, + "id": 12 } } } - ], - "destination": { - "local": 4, + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] }, - "target": null, - "unwind": "Continue" - } - }, - "span": 65 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 67 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 8, - 0, - [ - { - "Lifetime": { - "kind": "ReErased" - } - } - ], - null, - null - ] - }, - [ + { + "Use": { + "Copy": { + "local": 1, + "projection": [ { - "Copy": { - "local": 10, - "projection": [] - } + "Field": [ + 0, + 2 + ] } ] - ] + } } - ] - }, - "span": 68 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 9, - "projection": [] - } - ] - } - ] + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } }, - "span": 69 - }, - { - "kind": { - "Assign": [ - { - "local": 21, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, + "targets": { + "branches": [ + [ + 42, + 1 + ] + ], + "otherwise": 2 + } + } + }, + "span": 50 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, "projection": [ - "Deref", { "Field": [ 0, - 29 + 2 ] } ] } - } - ] - }, - "span": 70 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 21, - "projection": [ - "Deref", - { - "Field": [ - 0, - 2 - ] - } - ] + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } + }, + { + "local": 5, + "projection": [] } - } - ] - }, - "span": 70 - } - ], - "terminator": { + ] + } + ] + }, + "span": 61 + }, + { "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 12, - "projection": [] - } + "Assign": [ + { + "local": 20, + "projection": [] }, - "targets": { - "branches": [ - [ - 43, - 5 + { + "CopyForDeref": { + "local": 6, + "projection": [ + "Deref" ] - ], - "otherwise": 6 + } } - } + ] }, - "span": 66 - } - }, - { - "statements": [], - "terminator": { + "span": 62 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 71, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 - } - } + "Assign": [ + { + "local": 20, + "projection": [ + "Deref" + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 63, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 43 ], "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 28, - "id": 16 + "ty": 2, + "id": 13 } } } - ], - "destination": { - "local": 8, + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 7, "projection": [] }, - "target": null, - "unwind": "Continue" - } - }, - "span": 71 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, + { + "Use": { + "Copy": { + "local": 1, "projection": [ - "Deref", { "Field": [ 0, - 29 + 2 ] } ] } } - ] - }, - "span": 73 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [ - "Deref", - { - "Field": [ - 1, - 25 - ] - } - ] - }, - { - "Use": { - "Constant": { - "span": 74, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 17 - } - } - } + "span": 64 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 3 + ] + ], + "otherwise": 4 + } + } + }, + "span": 59 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 65, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 } - ] + } }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 23, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ 0, - 29 - ] + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" } - ] + }, + "ty": 28, + "id": 15 } } - ] + } + ], + "destination": { + "local": 4, + "projection": [] }, - "span": 75 + "target": null, + "unwind": "Continue" + } + }, + "span": 65 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, + "span": 67 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 8, + 0, + [ + { + "Lifetime": { + "kind": "ReErased" + } + } + ], + null, + null + ] + }, + [ { - "Mut": { - "kind": "Default" + "Copy": { + "local": 10, + "projection": [] } - }, + } + ] + ] + } + ] + }, + "span": 68 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 9, + "projection": [] + } + ] + } + ] + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 21, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", { - "local": 23, - "projection": [ - "Deref", - { - "Field": [ - 2, - 26 - ] - } + "Field": [ + 0, + 29 ] } ] } - ] - }, - "span": 75 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 24, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, + "span": 70 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 21, "projection": [ "Deref", { "Field": [ 0, - 29 + 2 ] } ] } } - ] - }, - "span": 76 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 24, - "projection": [ - "Deref", - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] + "span": 70 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 12, + "projection": [] + } }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [ - "Deref" - ] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 15, - "projection": [] - } - }, - 26 - ] + "targets": { + "branches": [ + [ + 43, + 5 + ] + ], + "otherwise": 6 + } + } + }, + "span": 66 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 71, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 } - ] + } }, - "span": 77 - }, - { - "kind": { - "Assign": [ - { - "local": 16, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 25 + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] ] - } - ] - } + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 16 } } - ] + } + ], + "destination": { + "local": 8, + "projection": [] }, - "span": 72 + "target": null, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 71 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 16, - "projection": [] - } + "Assign": [ + { + "local": 22, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 8 + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } ] - ], - "otherwise": 7 + } } - } + ] }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { + "span": 73 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + "Assign": [ + { + "local": 22, + "projection": [ + "Deref", + { + "Field": [ + 1, + 25 + ] } - } + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 74, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 1 ], "provenance": { - "ptrs": [ - [ - 0, - 2 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 28, - "id": 18 + "ty": 25, + "id": 17 } } } - ], - "destination": { - "local": 13, + } + ] + }, + "span": 73 + }, + { + "kind": { + "Assign": [ + { + "local": 23, "projection": [] }, - "target": null, - "unwind": "Continue" - } - }, - "span": 78 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 18, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 26 - ] - } + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 ] } - } + ] } - ] - }, - "span": 80 - } - ], - "terminator": { + } + ] + }, + "span": 75 + }, + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 18, - "projection": [] - } + "Assign": [ + { + "local": 14, + "projection": [] }, - "targets": { - "branches": [ - [ - 43, - 9 + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 23, + "projection": [ + "Deref", + { + "Field": [ + 2, + 26 + ] + } + ] + } + ] + } + ] + }, + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 24, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } ] - ], - "otherwise": 10 + } } - } + ] }, - "span": 79 - } - }, - { - "statements": [], - "terminator": { + "span": 76 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 81, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 24, + "projection": [ + "Deref", + { + "Field": [ + 0, + 2 + ] + } + ] } } + } + ] + }, + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [ + "Deref" + ] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 27, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 3 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 19 + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 15, + "projection": [] } + }, + 26 + ] + } + ] + }, + "span": 77 + }, + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] } } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 16, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 8 + ] ], - "destination": { - "local": 17, + "otherwise": 7 + } + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 2 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 18 + } + } + } + ], + "destination": { + "local": 13, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 78 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 18, "projection": [] }, - "target": null, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 26 + ] + } + ] + } + } + } + ] }, - "span": 81 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 82 + "span": 80 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 18, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 9 + ] + ], + "otherwise": 10 + } + } + }, + "span": 79 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 81, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { "Constant": { - "span": 83, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 3 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 19 } } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 4 - ] + } + ], + "destination": { + "local": 17, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 81 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 82 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 4 ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 20 - } + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 20 } } - ], - "destination": { - "local": 19, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 83 - } + } + ], + "destination": { + "local": 19, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 83 } - ], - "locals": [ - { - "ty": 1, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 30, + } + ], + "locals": [ + { + "ty": 1, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 85, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 86, + "mutability": "Not" + }, + { + "ty": 2, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 87, + "mutability": "Mut" + }, + { + "ty": 33, + "span": 88, + "mutability": "Not" + }, + { + "ty": 2, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 34, + "span": 89, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 67, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 90, + "mutability": "Not" + }, + { + "ty": 2, + "span": 91, + "mutability": "Not" + }, + { + "ty": 32, + "span": 78, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 92, + "mutability": "Not" + }, + { + "ty": 2, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { "span": 85, - "mutability": "Mut" + "scope": 1 }, - { - "ty": 31, - "span": 86, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 2, - "span": 58, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "r1", + "source_info": { + "span": 86, + "scope": 2 }, - { - "ty": 32, - "span": 65, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 31, + "argument_index": null + }, + { + "name": "r1", + "source_info": { "span": 87, - "mutability": "Mut" + "scope": 3 }, - { - "ty": 33, - "span": 88, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "ty": 2, - "span": 64, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "r2", + "source_info": { + "span": 88, + "scope": 4 }, - { - "ty": 32, - "span": 71, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } }, - { - "ty": 34, + "argument_index": null + }, + { + "name": "e", + "source_info": { "span": 89, - "mutability": "Mut" + "scope": 5 }, - { - "ty": 29, - "span": 67, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } }, - { - "ty": 35, + "argument_index": null + }, + { + "name": "ee", + "source_info": { "span": 90, - "mutability": "Not" + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } }, - { - "ty": 2, + "argument_index": null + }, + { + "name": "vv", + "source_info": { "span": 91, - "mutability": "Not" + "scope": 7 }, - { - "ty": 32, - "span": 78, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } }, - { - "ty": 36, + "argument_index": null + }, + { + "name": "r3", + "source_info": { "span": 92, - "mutability": "Not" - }, - { - "ty": 2, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 31, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 85, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "r1", - "source_info": { - "span": 86, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "r1", - "source_info": { - "span": 87, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null + "scope": 8 }, - { - "name": "r2", - "source_info": { - "span": 88, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 89, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 9, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "ee", - "source_info": { - "span": 90, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 11, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "vv", - "source_info": { - "span": 91, - "scope": 7 - }, - "composite": null, - "value": { - "Place": { - "local": 12, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } }, - { - "name": "r3", - "source_info": { - "span": 92, - "scope": 8 - }, - "composite": null, - "value": { - "Place": { - "local": 14, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 93 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 93 + } } }, "details": null @@ -1972,356 +1881,419 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + }, + [ { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 + } ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 5, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 1 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 6, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 6 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" + "scope": 0 }, - { - "ty": 9, - "span": 12, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": null + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 13 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -2332,518 +2304,357 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>::{closure#0}", "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { + "span": 16 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageLive": 3 }, "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + } + ] }, - "span": 16 + "span": 17 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - ] + } }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 27 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + }, + "span": 16 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } ] } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + }, + "span": 22 }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "kind": { + "StorageLive": 6 + }, + "span": 23 }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { + { + "Use": { + "Copy": { "local": 2, - "projection": [] + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": { - "Cleanup": 3 + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] } - } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 24 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageDead": 6 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 25 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } + "StorageDead": 5 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null @@ -2854,283 +2665,454 @@ "MonoItemFn": { "name": "std::sys::backtrace::__rust_begin_short_backtrace::", "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { "Constant": { - "span": 31, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 19, - "id": 3 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + } + }, + "args": [ + { "Constant": { - "span": 34, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { "span": 38, - "mutability": "Not" + "scope": 0 }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h65a2c197bce21f15E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ea78c58d6db9c2E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { "Move": { "local": 1, - "projection": [] + "projection": [ + "Deref" + ] } }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h65a2c197bce21f15E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null @@ -3138,56 +3120,56 @@ ], "types": [ [ - 16, + 41, { "RigidTy": { - "Int": "I32" + "Uint": "U32" } } ], [ - 6, + 25, { - "RigidTy": { - "Int": "Isize" - } + "RigidTy": "Bool" } ], [ - 2, + 9, { "RigidTy": { - "Int": "I8" + "Uint": "U8" } } ], [ - 9, + 26, { "RigidTy": { - "Uint": "U8" + "Uint": "Usize" } } ], [ - 26, + 6, { "RigidTy": { - "Uint": "Usize" + "Int": "Isize" } } ], [ - 25, + 2, { - "RigidTy": "Bool" + "RigidTy": { + "Int": "I8" + } } ], [ - 41, + 16, { "RigidTy": { - "Uint": "U32" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state index 5b683d8de..67d5e6749 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -35,45 +35,45 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 43 , 64 , false ) , ty ( 26 ) , mutabilityMut ) ) ) , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 43 , 64 , false ) , ty ( 26 ) , mutabilityMut ) ) ) , ty ( 30 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 33 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 33 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) ) , ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 36 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) ) , ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 36 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) .Map @@ -90,5 +90,4 @@ ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) ty ( 41 ) |-> rigidTyUint ( uintTyU32 ) - - + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json index ce1206711..9b47e0ca3 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json @@ -1 +1,1895 @@ -{"name":"struct_field_update","crate_id":10235230017850619163,"allocs":[],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE"}],[20,{"IntrinsicSym":"black_box"}],[32,{"NoOpSym":""}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start17h7596bfce4c2de521E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN19struct_field_update4main17h502cdc578af7c9e8E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Aggregate":["Tuple",[{"Constant":{"span":51,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":9}}},{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[2,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}]]}]},"span":53},{"kind":{"Assign":[{"local":1,"projection":[]},{"Aggregate":[{"Adt":[7,0,[],null,null]},[{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[10,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":11}}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":25,"id":12}}},{"Constant":{"span":56,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,36,64],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":13}}},{"Move":{"local":2,"projection":[]}}]]}]},"span":57},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[1,25]}]},{"Use":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":25,"id":14}}}}]},"span":59},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[{"Field":[0,16]}]}}}]},"span":60},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[3,27]},{"Field":[1,16]}]},{"Use":{"Move":{"local":3,"projection":[]}}}]},"span":61},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[{"Field":[3,27]},{"Field":[0,16]}]}}}]},"span":62},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[0,16]}]},{"Use":{"Move":{"local":4,"projection":[]}}}]},"span":63},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[2,26]}]},{"Use":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[51,51,51,51,51,115,69,64],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":15}}}}]},"span":65}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"},{"ty":28,"span":67,"mutability":"Mut"},{"ty":27,"span":53,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Mut"},{"ty":16,"span":62,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"s","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h09bc4ea8ad5997d5E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h21cb4ff546418550E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null}],"types":[[16,{"RigidTy":{"Int":"I32"}}],[26,{"RigidTy":{"Float":"F64"}}],[25,{"RigidTy":"Bool"}],[2,{"RigidTy":{"Int":"I8"}}],[6,{"RigidTy":{"Int":"Isize"}}],[9,{"RigidTy":{"Uint":"U8"}}]],"debug":null} \ No newline at end of file +{ + "name": "struct_field_update", + "crate_id": 10235230017850619163, + "allocs": [], + "functions": [ + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E" + } + ], + [ + 32, + { + "NoOpSym": "" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h7596bfce4c2de521E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN19struct_field_update4main17h502cdc578af7c9e8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Aggregate": [ + "Tuple", + [ + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 9 + } + } + }, + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 2, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 10 + } + } + } + ] + ] + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 11 + } + } + }, + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 12 + } + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 36, + 64 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 13 + } + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + }, + { + "Use": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 14 + } + } + } + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 16 + ] + } + ] + } + } + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 3, + 27 + ] + }, + { + "Field": [ + 1, + 16 + ] + } + ] + }, + { + "Use": { + "Move": { + "local": 3, + "projection": [] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 3, + 27 + ] + }, + { + "Field": [ + 0, + 16 + ] + } + ] + } + } + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 16 + ] + } + ] + }, + { + "Use": { + "Move": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 26 + ] + } + ] + }, + { + "Use": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 51, + 51, + 51, + 51, + 51, + 115, + 69, + 64 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 15 + } + } + } + } + ] + }, + "span": 65 + } + ], + "terminator": { + "kind": "Return", + "span": 50 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 67, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 16, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 16, + "span": 62, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h09bc4ea8ad5997d5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h21cb4ff546418550E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 26, + { + "RigidTy": { + "Float": "F64" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 25, + { + "RigidTy": "Bool" + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state index 59c8c4af0..db5f4e5c3 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state @@ -25,12 +25,12 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) ) , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 28 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) ) , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 28 ) , mutabilityMut ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) @@ -40,12 +40,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state index 8be197b47..3092d7d0d 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state @@ -25,38 +25,38 @@ unwindActionContinue - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( noValue ( ty ( 16 ) , mutabilityMut ) ) - ListItem ( noValue ( ty ( 26 ) , mutabilityMut ) ) - ListItem ( noValue ( ty ( 27 ) , mutabilityMut ) ) ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state new file mode 100644 index 000000000..3092d7d0d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state @@ -0,0 +1,75 @@ + + + #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ~> .K + + + noReturn + + + ty ( 25 ) + + + + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 4 ) , projection: .ProjectionElems ) + + + someBasicBlockIdx ( basicBlockIdx ( 1 ) ) + + + unwindActionContinue + + + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) ) ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 26 ) |-> rigidTyBool + ty ( 27 ) |-> rigidTyFloat ( floatTyF64 ) + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json index 2100e09fd..f04cd7ef4 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json @@ -1,2131 +1,2111 @@ { - "name": "struct_tuple_fields", - "crate_id": 15052015653515667555, - "allocs": [], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 25, - { - "NormalSym": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ] + "name": "structs_tuples", + "crate_id": 4825803685595141642, + "allocs": [], + "functions": [ + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h12e57977f213b84cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE" + } + ], + [ + 25, + { + "NormalSym": "_ZN14structs_tuples3foo17h3890d1fc66f78799E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 33, + { + "NoOpSym": "" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0fc835eb50e37b13E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN14structs_tuples3foo17h3890d1fc66f78799E", + "mono_item_kind": { + "MonoItemFn": { + "name": "foo", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 73 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 16, + "span": 75, + "mutability": "Not" + }, + { + "ty": 26, + "span": 76, + "mutability": "Not" + }, + { + "ty": 27, + "span": 77, + "mutability": "Not" + } + ], + "arg_count": 3, + "var_debug_info": [ + { + "name": "_i", + "source_info": { + "span": 75, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "_b", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "_f", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + } + ], + "spread_arg": null, + "span": 78 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h35bcf3f6dc6c431bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "ty": 7, - "span": 43, - "mutability": "Not" + "Downcast": 0 }, { - "ty": 1, - "span": 43, - "mutability": "Not" + "Field": [ + 0, + 6 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN14structs_tuples4main17hc13d6b1ad2ba5288E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { + "align": 4, + "mutability": "Mut" + } + }, "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + "id": 10 + } } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + "ty": 26, + "id": 11 + } + } + }, + { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 36, + 64 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } }, - "argument_index": 1 + "ty": 27, + "id": 12 + } } - ], - "spread_arg": null, - "span": 3 + } + ] + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 27 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN19struct_tuple_fields4main17he368ec089685e92cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 10 - } - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } - } - }, - { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 36, - 64 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 12 - } - } - } - ] - ] - } - ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 27 - ] - } - ] - } - } - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Aggregate": [ - "Tuple", - [ - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 11, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 13 - } - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 14 - } - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 27 - ] - } - ] - } - } - } - ] - }, - "span": 62 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 7, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 65 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 66 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 2, - 27 - ] - } - ] - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 9, - "projection": [] - } - }, - { - "Move": { - "local": 10, - "projection": [] - } - }, - { - "Move": { - "local": 11, - "projection": [] - } - } - ], - "destination": { - "local": 8, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "local": 2, + "projection": [] + }, + { + "Aggregate": [ + "Tuple", + [ + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 11, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 68 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 70, - "mutability": "Not" - }, - { - "ty": 29, - "span": 71, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 51, - "mutability": "Not" - }, - { - "ty": 16, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 62, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - }, - { + "align": 4, + "mutability": "Mut" + } + }, "ty": 16, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 67, - "mutability": "Mut" + "id": 13 + } } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "s", - "source_info": { - "span": 70, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "t", - "source_info": { - "span": 71, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } }, - "argument_index": null + "ty": 26, + "id": 14 + } } - ], - "spread_arg": null, - "span": 72 + }, + { + "Move": { + "local": 3, + "projection": [] + } + } + ] + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 16 + ] } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 26 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 27 + ] } - ], - "spread_arg": null, - "span": 49 + ] + } + } } - ] + ] + }, + "span": 62 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 7, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ + }, + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } + "local": 9, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 16 + ] } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 65 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 26 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 66 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 2, + 27 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 9, + "projection": [] + } + }, + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Move": { + "local": 11, + "projection": [] + } + } + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 64 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hb9b0e627f12f2913E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 68 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 70, + "mutability": "Not" + }, + { + "ty": 29, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + }, + { + "ty": 16, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + }, + { + "ty": 16, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 67, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 70, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "t", + "source_info": { + "span": 71, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "spread_arg": null, - "span": 13 + ] + } + } } - ] + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 } - }, - "details": null - }, - { - "symbol_name": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "foo", - "id": 8, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 73 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 16, - "span": 75, - "mutability": "Not" - }, - { - "ty": 26, - "span": 76, - "mutability": "Not" - }, - { - "ty": 27, - "span": 77, - "mutability": "Not" - } - ], - "arg_count": 3, - "var_debug_info": [ - { - "name": "_i", - "source_info": { - "span": 75, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "_b", - "source_info": { - "span": 76, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "_f", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - } - ], - "spread_arg": null, - "span": 78 + "Move": { + "local": 3, + "projection": [] + } } - ] + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ea230cb4a81ac50E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, { - "ty": 1, - "span": 43, - "mutability": "Not" + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 } - }, - "details": null + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 } - } - ], - [ - 26, - { - "RigidTy": "Bool" - } - ], - [ - 27, - { - "RigidTy": { - "Float": "F64" + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcc7804faa37550b8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + } + ], + "types": [ + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } ], - "debug": null -} \ No newline at end of file + [ + 27, + { + "RigidTy": { + "Float": "F64" + } + } + ], + [ + 26, + { + "RigidTy": "Bool" + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/proving/unchecked-add-spec.k b/kmir/src/tests/integration/data/proving/unchecked-add-spec.k new file mode 100644 index 000000000..f77039109 --- /dev/null +++ b/kmir/src/tests/integration/data/proving/unchecked-add-spec.k @@ -0,0 +1,75 @@ +module UNCHECKED-ADD-SPEC + imports KMIR + + claim [unchecked-ADD-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody (body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ) + + + requires // i16 invariants + 0 -Int (1 < None: +def test_prove_termination(test_data: tuple[str, Path], tmp_path: Path, kmir: KMIR) -> None: testname, smir_json = test_data spec_file = tmp_path / f'{testname}.k' gen_opts = GenSpecOpts(smir_json, spec_file, 'main') @@ -364,3 +365,23 @@ def test_prove(test_data: tuple[str, Path], tmp_path: Path, kmir: KMIR) -> None: for label in claim_labels: proof = Proof.read_proof_data(proof_dir, label) assert proof.passed + + +PROVING_DIR = (Path(__file__).parent / 'data' / 'proving').resolve(strict=True) +PROVING_FILES = list(PROVING_DIR.glob('*-spec.k')) + + +@pytest.mark.parametrize( + 'spec', + PROVING_FILES, + ids=[spec.stem for spec in PROVING_FILES], +) +def test_prove(spec: Path, tmp_path: Path, kmir: KMIR) -> None: + proof_dir = tmp_path / (spec.stem + 'proofs') + prove_opts = ProveRunOpts(spec, proof_dir, None, None) + _kmir_prove_run(prove_opts) + + claim_labels = kmir.get_claim_index(spec).labels() + for label in claim_labels: + proof = Proof.read_proof_data(proof_dir, label) + assert proof.passed diff --git a/package/version b/package/version index b73ea9581..0793ec760 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.103 +0.3.107 From 74a18a1a6e06e92d4181a394876eeee17ac95815 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Thu, 27 Mar 2025 15:14:18 -0300 Subject: [PATCH 18/84] Revert "Merging master into branch" (#513) Reverts runtimeverification/mir-semantics#512 --------- Co-authored-by: devops --- README.md | 15 +- deps/stable-mir-json | 2 +- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- kmir/src/kmir/kdist/mir-semantics/body.md | 6 +- kmir/src/kmir/kdist/mir-semantics/kmir.md | 108 +- .../kdist/mir-semantics/lemmas/kmir-lemmas.md | 2 + kmir/src/kmir/kdist/mir-semantics/mono.md | 2 +- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 626 +- kmir/src/kmir/parse/notes.md | 2 +- kmir/src/kmir/parse/parser.py | 2 +- .../arithmetic-unchecked-runs.smir.json | 7192 +++++++++-------- .../arithmetic-unchecked-runs.state | 48 +- .../exec-smir/arithmetic/arithmetic.smir.json | 5434 ++++++------- .../exec-smir/arithmetic/arithmetic.state | 54 +- .../data/exec-smir/arithmetic/unary.smir.json | 3770 ++++----- .../data/exec-smir/arithmetic/unary.state | 26 +- .../assign-cast/assign-cast.smir.json | 2162 +---- .../exec-smir/assign-cast/assign-cast.state | 44 +- .../call-with-args/main-a-b-with-int.23.state | 28 +- .../call-with-args/main-a-b-with-int.27.state | 62 - .../main-a-b-with-int.smir.json | 3378 ++++---- .../exec-smir/main-a-b-c/main-a-b-c.19.state | 26 +- .../exec-smir/main-a-b-c/main-a-b-c.run.state | 20 +- .../exec-smir/main-a-b-c/main-a-b-c.smir.json | 1660 +--- .../exec-smir/references/doubleRef.smir.json | 4454 +++++----- .../data/exec-smir/references/doubleRef.state | 36 +- .../exec-smir/references/mutableRef.smir.json | 3440 ++++---- .../exec-smir/references/mutableRef.state | 31 +- .../exec-smir/references/refAsArg.smir.json | 3110 +++---- .../data/exec-smir/references/refAsArg.state | 24 +- .../exec-smir/references/refAsArg2.smir.json | 3188 ++++---- .../data/exec-smir/references/refAsArg2.state | 26 +- .../references/refReturned.smir.json | 3340 ++++---- .../exec-smir/references/refReturned.state | 28 +- .../exec-smir/references/simple.smir.json | 2920 +++---- .../data/exec-smir/references/simple.state | 22 +- .../exec-smir/references/weirdRefs.smir.json | 5054 ++++++------ .../data/exec-smir/references/weirdRefs.state | 59 +- .../struct_field_update.smir.json | 1896 +---- .../structs-tuples/struct_field_update.state | 24 +- .../structs-tuples/structs-tuples.84.state | 46 +- .../structs-tuples/structs-tuples.90.state | 75 - .../structs-tuples/structs-tuples.smir.json | 4112 +++++----- .../data/proving/unchecked-add-spec.k | 75 - .../data/schema-parse/monoitem/input.json | 619 -- .../data/schema-parse/monoitem/reference.kmir | 12 - .../data/schema-parse/monoitem/reference.sort | 1 - .../src/tests/integration/test_integration.py | 31 +- package/version | 2 +- 50 files changed, 25464 insertions(+), 31834 deletions(-) delete mode 100644 kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state delete mode 100644 kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state delete mode 100644 kmir/src/tests/integration/data/proving/unchecked-add-spec.k delete mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/input.json delete mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/reference.kmir delete mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/reference.sort diff --git a/README.md b/README.md index e9312659b..7e3e7eb78 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ If you would like to try a legacy version of the project, [this blog post](https ## For Developers -### KMIR Setup +### Setup -Pre-requisites: `python >= 3.10`, `pip >= 20.0.2`, `poetry >= 1.3.2`, `gcc >= 11.4.0`, `cargo == nightly-2024-11-29`, `k >= v7.1.205`. To install K, follow the steps available in [K's Quick Start instructions](https://github.com/runtimeverification/k?tab=readme-ov-file#quick-start). +Pre-requisites: `python >= 3.10`, `pip >= 20.0.2`, `poetry >= 1.3.2`. ```bash make build @@ -23,17 +23,6 @@ Use `make` to run common tasks (see the [Makefile](Makefile) for a complete list For interactive use, spawn a shell with `poetry -C kmir/ shell` (after `poetry -C kmir/ install`), then run an interpreter. Or directly run from `mir-semantics` root with `poetry run -C kmir kmir ` -### Stable-MIR-JSON Setup - -At the moment, to interact with some of KMIR functionalities, it is necessary to provide the tool with a serialized JSON of a Rust program's Stable MIR. To be able to extract these serialized SMIR JSONs, you can use the `Stable-MIR-JSON` tool, setting it up with the following commands: - -```Rust -git submodule update --init --recursive -make stable-mir-json -``` - -For more information on testing, installation, and general usage of this tool, please check [Stable-MIR-JSON's repository](https://github.com/runtimeverification/stable-mir-json/). - ## Usage Use `--help` with each command for more details. diff --git a/deps/stable-mir-json b/deps/stable-mir-json index 463282e2c..fbdfe361d 160000 --- a/deps/stable-mir-json +++ b/deps/stable-mir-json @@ -1 +1 @@ -Subproject commit 463282e2c3abba3db87323c29df19d24c3363dfb +Subproject commit fbdfe361d79a7d125d4ff70fb7c7b354eee483ee diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index fb8df5298..dcc4cafaf 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.107" +version = "0.3.108" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index e69cf1174..f47ac201c 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.107' +VERSION: Final = '0.3.108' diff --git a/kmir/src/kmir/kdist/mir-semantics/body.md b/kmir/src/kmir/kdist/mir-semantics/body.md index 32f13531e..4a175b6ec 100644 --- a/kmir/src/kmir/kdist/mir-semantics/body.md +++ b/kmir/src/kmir/kdist/mir-semantics/body.md @@ -5,7 +5,7 @@ requires "ty.md" module BODY-SORTS syntax Body -syntax MaybeBody +syntax Bodies syntax DefId syntax MaybeInt syntax MIRBool @@ -355,10 +355,10 @@ syntax VarDebugInfo ::= varDebugInfo(name: Symbol, sourceInfo: SourceInfo, compo syntax VarDebugInfos ::= List {VarDebugInfo, ""} [group(mir-list), symbol(VarDebugInfos::append), terminator-symbol(VarDebugInfos::empty)] -syntax MaybeBody ::= someBody(Body) [group(mir-option)] - | "noBody" [group(mir-option)] syntax Body ::= body(blocks: BasicBlocks, locals: LocalDecls, argCount: MIRInt, varDebugInfo: VarDebugInfos, spreadArg: MaybeLocal, span: Span) [group(mir---blocks--locals--arg-count--var-debug-info--spread-arg--span)] +syntax Bodies ::= List {Body, ""} + [group(mir-list), symbol(Bodies::append), terminator-symbol(Bodies::empty)] endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index d7886dac8..dcf29818e 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -219,7 +219,7 @@ be known to populate the `currentFunc` field. rule #execFunction( monoItem( SYMNAME, - monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS,LOCALS, _, _, _, _))) + monoItemFn(_, _, body((FIRST:BasicBlock _) #as BLOCKS,LOCALS, _, _, _, _) .Bodies) ), FUNCTIONNAMES ) @@ -259,7 +259,7 @@ be known to populate the `currentFunc` field. rule #reserveFor(localDecl(TY, _, MUT) REST:LocalDecls) => - ListItem(newLocal(TY, MUT)) #reserveFor(REST) + ListItem(noValue(TY, MUT)) #reserveFor(REST) ``` Executing a function body consists of repeated calls to `#execBlock` @@ -312,12 +312,19 @@ will effectively be no-ops at this level). // all memory accesses relegated to another module (to be added) rule #execStmt(statement(statementKindAssign(PLACE, RVAL), _SPAN)) => - #setLocalValue(PLACE, RVAL) + RVAL ~> #assign(PLACE) ... // RVAL evaluation is implemented in rt/data.md + syntax KItem ::= #assign ( Place ) + + rule VAL:TypedLocal ~> #assign(PLACE) ~> CONT + => + VAL ~> #setLocalValue(PLACE) ~> CONT + + rule #execStmt(statement(statementKindSetDiscriminant(_PLACE, _VARIDX), _SPAN)) => .K // FIXME! write variant index to PLACE @@ -352,9 +359,10 @@ function call, pushing a new stack frame and returning to a different block after the call returns. ```k - rule #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) ~> _CONT + rule #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) => #execBlockIdx(I) + ... // FIXME: We assume this is empty. Explicitly throw away or check that it is? ``` @@ -362,31 +370,31 @@ A `SwitchInt` terminator selects one of the blocks given as _targets_, depending on the value of a _discriminant_. ```k - syntax KItem ::= #selectBlock ( SwitchTargets , Evaluation ) [strict(2)] - rule #execTerminator(terminator(terminatorKindSwitchInt(DISCR, TARGETS), _SPAN)) ~> _CONT => - #selectBlock(TARGETS, DISCR) + #readOperand(DISCR) ~> #selectBlock(TARGETS) - rule #selectBlock(TARGETS, typedValue(Integer(I, _, _), _, _)) + rule typedLocal(Integer(I, _, _), _, _) ~> #selectBlock(TARGETS) => #execBlockIdx(#selectBlock(I, TARGETS)) ... - rule #selectBlock(TARGETS, typedValue(BoolVal(false), _, _)) + rule typedLocal(BoolVal(false), _, _) ~> #selectBlock(TARGETS) => #execBlockIdx(#selectBlock(0, TARGETS)) ... - rule #selectBlock(TARGETS, typedValue(BoolVal(true), _, _)) + rule typedLocal(BoolVal(true), _, _) ~> #selectBlock(TARGETS) => #execBlockIdx(#selectBlock(1, TARGETS)) ... + syntax KItem ::= #selectBlock ( SwitchTargets ) + syntax BasicBlockIdx ::= #selectBlock ( Int , SwitchTargets) [function, total] | #selectBlockAux ( Int, Branches, BasicBlockIdx ) [function, total] @@ -415,12 +423,10 @@ context of the enclosing stack frame, at the _target_. If the returned value is a `Reference`, its stack height must be decremented because a stack frame is popped. NB that a stack height of `0` cannot occur here, because the compiler prevents local variable references from escaping. -If the loval `_0` does not have a value (i.e., it remained uninitialised), the function returns unit and writing the value is skipped. - ```k rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #setLocalValue(DEST, #decrementRef(LOCAL0)) ~> #execBlockIdx(TARGET) + #decrementRef(LOCAL0) ~> #setLocalValue(DEST) ~> #execBlockIdx(TARGET) ~> .K _ => CALLER // @@ -429,33 +435,14 @@ If the loval `_0` does not have a value (i.e., it remained uninitialised), the f DEST => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET _ => UNWIND - ListItem(LOCAL0:TypedValue) _ => NEWLOCALS + ListItem(LOCAL0:TypedLocal) _ => NEWLOCALS // // remaining call stack (without top frame) ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK FUNCS requires CALLER in_keys(FUNCS) - [preserves-definedness] // CALLER lookup defined - - // no value to return, skip writing - rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ - => - #execBlockIdx(TARGET) - - _ => CALLER - // - _ => #getBlocks(FUNCS, CALLER) - CALLER => NEWCALLER - _ => NEWDEST - someBasicBlockIdx(TARGET) => NEWTARGET - _ => UNWIND - ListItem(_:NewLocal) _ => NEWLOCALS - // - // remaining call stack (without top frame) - ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK - FUNCS - requires CALLER in_keys(FUNCS) - [preserves-definedness] // CALLER lookup defined + // andBool DEST #within(LOCALS) + [preserves-definedness] // CALLER lookup defined, DEST within locals TODO syntax List ::= #getBlocks(Map, Ty) [function] | #getBlocksAux(MonoItemKind) [function, total] @@ -463,10 +450,11 @@ If the loval `_0` does not have a value (i.e., it remained uninitialised), the f rule #getBlocks(FUNCS, ID) => #getBlocksAux({FUNCS[ID]}:>MonoItemKind) requires ID in_keys(FUNCS) - // returns blocks from the body - rule #getBlocksAux(monoItemFn(_, _, noBody)) => .List - rule #getBlocksAux(monoItemFn(_, _, someBody(body(BLOCKS, _, _, _, _, _)))) => toKList(BLOCKS) - // other item kinds are not expected or supported FIXME: Just getting stuck for now + // returns blocks from the _first_ body if there are several + // TODO handle cases with several blocks + rule #getBlocksAux(monoItemFn(_, _, .Bodies)) => .List + rule #getBlocksAux(monoItemFn(_, _, body(BLOCKS, _, _, _, _, _) _)) => toKList(BLOCKS) + // other item kinds are not expected or supported rule #getBlocksAux(monoItemStatic(_, _, _)) => .List // should not occur in calls at all rule #getBlocksAux(monoItemGlobalAsm(_)) => .List // not supported. FIXME Should error, maybe during #init ``` @@ -487,7 +475,7 @@ The call stack is not necessarily empty at this point so it is left untouched. _ => return(VAL) noBasicBlockIdx - ListItem(typedValue(VAL, _, _)) ... + ListItem(typedLocal(VAL, _, _)) ... ... @@ -498,7 +486,7 @@ The call stack is not necessarily empty at this point so it is left untouched. noBasicBlockIdx - ListItem(newLocal(_, _)) ... + ListItem(noValue(_, _)) ... ... ``` @@ -509,9 +497,10 @@ where the returned result should go. ```k - rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) ~> _ + rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) => #setUpCalleeData({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind, ARGS) + ... CALLER => #tyOfCall(FUNC) @@ -544,7 +533,7 @@ An operand may be a `Reference` (the only way a function could access another fu // reserve space for local variables and copy/move arguments from old locals into their place rule #setUpCalleeData( - monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))), + monoItemFn(_, _, body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _) _:Bodies), ARGS ) => @@ -562,7 +551,6 @@ An operand may be a `Reference` (the only way a function could access another fu // assumption: arguments stored as _1 .. _n before actual "local" data ... - // TODO: Haven't handled "noBody" case syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) @@ -578,13 +566,13 @@ An operand may be a `Reference` (the only way a function could access another fu rule #setArgFromStack(IDX, operandConstant(_) #as CONSTOPERAND) => - #setLocalValue(place(local(IDX), .ProjectionElems), CONSTOPERAND) + #readOperand(CONSTOPERAND) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) ... rule #setArgFromStack(IDX, operandCopy(place(local(I), .ProjectionElems))) => - #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef({CALLERLOCALS[I]}:>TypedLocal)) + #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List @@ -596,7 +584,7 @@ An operand may be a `Reference` (the only way a function could access another fu rule #setArgFromStack(IDX, operandMove(place(local(I), .ProjectionElems))) => - #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef({CALLERLOCALS[I]}:>TypedLocal)) + #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS => CALLERLOCALS[I <- Moved])) _:List @@ -609,39 +597,25 @@ An operand may be a `Reference` (the only way a function could access another fu ``` The `Assert` terminator checks that an operand holding a boolean value (which has previously been computed, e.g., an overflow flag for arithmetic operations) has the expected value (e.g., that this overflow flag is `false` - a very common case). If the condition value is as expected, the program proceeds with the given `target` block. -Otherwise the provided message is passed to a `panic!` call, ending the program with an error, modelled as an `AssertError` in the semantics. +Otherwise the provided message is passed to a `panic!` call, ending the program with an error, modelled as an `#AssertError` in the semantics. ```k - syntax MIRError ::= AssertError ( AssertMessage ) + syntax KItem ::= #AssertError ( AssertMessage ) rule #execTerminator(terminator(assert(COND, EXPECTED, MSG, TARGET, _UNWIND), _SPAN)) ~> _CONT => - #expect(COND, EXPECTED, MSG) ~> #execBlockIdx(TARGET) + #readOperand(COND) ~> #expect(EXPECTED, MSG) ~> #execBlockIdx(TARGET) - syntax KItem ::= #expect ( Evaluation, Bool, AssertMessage ) [strict(1)] + syntax KItem ::= #expect ( Bool, AssertMessage ) - rule #expect(typedValue(BoolVal(COND), _, _), EXPECTED, _MSG) => .K ... + rule typedLocal(BoolVal(COND), _, _) ~> #expect(EXPECTED, _MSG) => .K ... requires COND ==Bool EXPECTED - rule #expect(typedValue(BoolVal(COND), _, _), EXPECTED, MSG) => AssertError(MSG) ... + rule typedLocal(BoolVal(COND), _, _) ~> #expect(EXPECTED, MSG) => #AssertError(MSG) ... requires COND =/=Bool EXPECTED ``` -### Stopping on Program Errors - -The semantics has a dedicated error sort to stop execution when flawed input or undefined behaviour is detected. -This includes cases of invalid MIR (e.g., accessing non-existing locals in a block or jumping to non-existing blocks), mutation of immutable values, or accessing uninitialised locals, but also user errors such as division by zero or overflowing unchecked arithmetic operations. - -The execution will stop with the respective error information as soon as an error condition is detected. - -```k - syntax KItem ::= #ProgramError ( MIRError ) - - rule [program-error]: - ERR:MIRError => #ProgramError(ERR) ... -``` - ```k endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md index ffe5e10ac..95b98e85d 100644 --- a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md +++ b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md @@ -48,8 +48,10 @@ Therefore, its value range should be simplified for symbolic input asserted to b requires VAL true + rule hasValue(Moved) => false + rule hasValue(noValue(_, _)) => false + + rule isNoValue(typedLocal(_, _, _)) => false + rule isNoValue(Moved) => false + rule isNoValue(noValue(_, _)) => true + syntax MaybeTy ::= tyOfLocal ( TypedLocal ) [function, total] - // ---------------------------------------------------------- - rule tyOfLocal(typedValue(_, TY, _)) => TY + rule tyOfLocal(typedLocal(_, TY, _)) => TY rule tyOfLocal(Moved) => TyUnknown - rule tyOfLocal(newLocal(TY, _)) => TY - - syntax Mutability ::= mutabilityOf ( TypedLocal ) [function, total] - // ---------------------------------------------------------------- - rule mutabilityOf(typedValue(_, _, MUT)) => MUT - rule mutabilityOf(Moved) => mutabilityNot - rule mutabilityOf(newLocal(_, MUT)) => MUT + rule tyOfLocal(noValue(TY, _)) => TY + + syntax Bool ::= isMutable ( TypedLocal ) [function, total] + rule isMutable(typedLocal(_, _, mutabilityMut)) => true + rule isMutable(typedLocal(_, _, mutabilityNot)) => false + rule isMutable(Moved) => false + rule isMutable(noValue(_, mutabilityMut)) => true + rule isMutable(noValue(_, mutabilityNot)) => false ``` -Access to a `TypedLocal` (whether reading or writing) may fail for a number of reasons. -It is an error to use a `Moved` local in any way, or to read an uninitialised `NewLocal`. -Also, locals are accessed via their index in list `` in a stack frame, which may be out of bounds. -Types are also checked, using the `Ty` (an opaque number assigned by the Stable MIR extraction). +Access to a `TypedLocal` (whether reading or writing( may fail for a number of reasons. +Every access is modelled as a _function_ whose result needs to be checked by the caller. ```k syntax LocalAccessError ::= InvalidLocal ( Local ) - | TypeMismatch( Local, MaybeTy, TypedValue ) + | TypeMismatch( Local, MaybeTy, TypedLocal ) | LocalMoved( Local ) | LocalNotMutable ( Local ) - | LocalUninitialised( Local ) + | "Uninitialised" + | "NoValueToWrite" + | "ValueMoved" + | Unsupported ( String ) // draft code - syntax MIRError ::= LocalAccessError + syntax KItem ::= #LocalError ( LocalAccessError ) endmodule ``` @@ -93,22 +98,10 @@ module RT-DATA imports KMIR-CONFIGURATION ``` -### Evaluating Items to `TypedValue` or `TypedLocal` - -Some built-in operations (`RValue` or type casts) use constructs that will evaluate to a value of sort `TypedValue`. -The basic operations of reading and writing those values can use K's "heating" and "cooling" rules to describe their evaluation. -Other uses of heating and cooling are to _read_ local variables as operands. This may include `Moved` locals or uninitialised `NewLocal`s (as error cases). Therefore we use the supersort `TypedLocal` of `TypedValue` as the `Result` sort. - -```k - syntax Evaluation ::= TypedLocal // other sorts are added at the first use site - - syntax KResult ::= TypedLocal -``` - ### Reading operands (local variables and constants) ```k - syntax Evaluation ::= Operand + syntax KItem ::= #readOperand ( Operand ) ``` _Read_ access to `Operand`s (which may be local values) may have similar errors as write access. @@ -116,9 +109,9 @@ _Read_ access to `Operand`s (which may be local values) may have similar errors Constant operands are simply decoded according to their type. ```k - rule operandConstant(constOperand(_, _, mirConst(KIND, TY, _))) + rule #readOperand(operandConstant(constOperand(_, _, mirConst(KIND, TY, _)))) => - typedValue(#decodeConstant(KIND, {TYPEMAP[TY]}:>RigidTy), TY, mutabilityNot) + typedLocal(#decodeConstant(KIND, {TYPEMAP[TY]}:>RigidTy), TY, mutabilityNot) ... TYPEMAP @@ -135,7 +128,7 @@ Reading a _Copied_ operand means to simply put it in the K sequence. Obviously, local value cannot be read, though, and the value should be initialised. ```k - rule operandCopy(place(local(I), .ProjectionElems)) + rule #readOperand(operandCopy(place(local(I), .ProjectionElems))) => LOCALS[I] ... @@ -143,29 +136,31 @@ local value cannot be read, though, and the value should be initialised. LOCALS requires 0 <=Int I andBool I TypedLocal) [preserves-definedness] // valid list indexing checked - rule operandCopy(place(local(I) #as LOCAL, _)) + rule #readOperand(operandCopy(place(local(I) #as LOCAL, .ProjectionElems))) => - LocalMoved(LOCAL) + #LocalError(LocalMoved(LOCAL)) ... LOCALS - requires 0 <=Int I + requires LOCALS[I] ==K Moved + andBool 0 <=Int I andBool I operandCopy(place(local(I), _)) + rule #readOperand(operandCopy(place(local(I), .ProjectionElems))) => - LocalUninitialised(local(I)) + #LocalError(Uninitialised) ... LOCALS - requires I TypedLocal) + andBool I operandMove(place(local(I), .ProjectionElems)) + rule #readOperand(operandMove(place(local(I), .ProjectionElems))) => LOCALS[I] ... LOCALS => LOCALS[I <- Moved] - requires 0 <=Int I + requires hasValue({LOCALS[I]}:>TypedLocal) + andBool 0 <=Int I andBool I operandMove(place(local(I) #as LOCAL, _)) + rule #readOperand(operandMove(place(local(I) #as LOCAL, .ProjectionElems))) => - LocalMoved(LOCAL) + #LocalError(LocalMoved(LOCAL)) ... LOCALS - requires 0 <=Int I + requires LOCALS[I] ==K Moved + andBool 0 <=Int I andBool I operandMove(place(local(I), _)) + rule #readOperand(operandMove(place(local(I), .ProjectionElems))) => - LocalUninitialised(local(I)) + #LocalError(Uninitialised) ... LOCALS - requires 0 <=Int I + requires isNoValue({LOCALS[I]}:>TypedLocal) + andBool 0 <=Int I andBool I operandCopy(place(local(I), PROJECTIONS)) + rule #readOperand(operandCopy(place(local(I), PROJECTIONS))) => - #readProjection({LOCALS[I]}:>TypedValue, PROJECTIONS) + #readProjection({LOCALS[I]}:>TypedLocal, PROJECTIONS) ... LOCALS requires PROJECTIONS =/=K .ProjectionElems andBool 0 <=Int I andBool I TypedLocal) [preserves-definedness] // valid list indexing checked ``` @@ -238,89 +236,92 @@ Related code currently resides in the value-implementing module. ### Setting local variables (including error cases) -The `#setLocalValue` operation writes a `TypedLocal` value to a given `Place` within the `List` of local variables currently on top of the stack. This may fail because a local may not be accessible, moved away, or not mutable. +The `#setLocalValue` operation writes a `TypedLocal` value preceeding it in the K sequence to a given `Place` within the `List` of local variables currently on top of the stack. This may fail because a local may not be accessible, moved away, or not mutable. ```k - syntax KItem ::= #setLocalValue( Place, Evaluation ) [strict(2)] + syntax KItem ::= #setLocalValue( Place ) // error cases first - rule #setLocalValue( place(local(I) #as LOCAL, _), _) => InvalidLocal(LOCAL) ... + rule _:TypedLocal ~> #setLocalValue( place(local(I) #as LOCAL, _)) => #LocalError(InvalidLocal(LOCAL)) ... LOCALS requires size(LOCALS) <=Int I orBool I #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems), typedValue(_, TY, _) #as VAL) + rule typedLocal(_, TY, _) #as VAL ~> #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems)) => - TypeMismatch(LOCAL, tyOfLocal({LOCALS[I]}:>TypedLocal), VAL) + #LocalError(TypeMismatch(LOCAL, tyOfLocal({LOCALS[I]}:>TypedLocal), VAL)) ... LOCALS - requires 0 <=Int I - andBool I TypedLocal) =/=K TY [preserves-definedness] // list index checked before lookup - // setting a local which was Moved is an error - rule #setLocalValue( place(local(I), .ProjectionElems), _) + // setting a local to Moved is an error + rule _:TypedLocal ~> #setLocalValue( place(local(I), _)) => - LocalMoved(local(I)) + #LocalError(LocalMoved(local(I))) ... LOCALS - requires 0 <=Int I - andBool I #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems), _) + rule typedLocal(_, _, _) ~> #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems)) => - LocalNotMutable(LOCAL) + #LocalError(LocalNotMutable(LOCAL)) ... LOCALS requires I TypedLocal) ==K mutabilityNot + andBool isTypedLocal(LOCALS[I]) + andBool notBool isMutable({LOCALS[I]}:>TypedLocal) // not mutable + andBool notBool isNoValue({LOCALS[I]}:>TypedLocal) // noValue(_, mutabilityNot) is mutable once + + // writing no value is a no-op + rule noValue(_, _) ~> #setLocalValue( _) => .K ... + // FIXME some zero-sized values are not initialised. Otherwise we could use a special value `ZeroSized` here + + // writing a moved value is an error + rule Moved ~> #setLocalValue( _) => #LocalError(ValueMoved) ... // if all is well, write the value - // mutable local - rule #setLocalValue(place(local(I), .ProjectionElems), typedValue(VAL:Value, TY, _ )) + // + rule typedLocal(VAL:Value, TY, _ ) ~> #setLocalValue(place(local(I), .ProjectionElems)) => .K ... - - LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)] - + LOCALS => LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)] requires 0 <=Int I andBool I TypedLocal) ==K mutabilityMut + andBool isTypedLocal(LOCALS[I]) andBool (tyOfLocal({LOCALS[I]}:>TypedLocal) ==K TY orBool TY ==K TyUnknown) // matching or unknown type + andBool isMutable({LOCALS[I]}:>TypedLocal) // mutable [preserves-definedness] // valid list indexing checked // special case for non-mutable uninitialised values: mutable once - rule #setLocalValue(place(local(I), .ProjectionElems), typedValue(VAL:Value, TY, _ )) + rule typedLocal(VAL:Value, TY, _ ) ~> #setLocalValue(place(local(I), .ProjectionElems)) => .K ... - - LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityOf({LOCALS[I]}:>TypedLocal))] - + LOCALS => LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityNot)] requires 0 <=Int I andBool I TypedLocal) ==K TY orBool TY ==K TyUnknown) // matching or unknown type + andBool notBool isMutable({LOCALS[I]}:>TypedLocal) // not mutable but + andBool isNoValue({LOCALS[I]}:>TypedLocal) // not initialised yet [preserves-definedness] // valid list indexing checked ``` ## Evaluation of RValues -The `Rvalue` sort in MIR represents various operations that produce a value which can be assigned to a `Place`. +The `RValue` sort in MIR represents various operations that produce a value which can be assigned to a `Place`. | RValue | Arguments | Action | |----------------|-------------------------------------------------|--------------------------------------| @@ -344,11 +345,9 @@ The `Rvalue` sort in MIR represents various operations that produce a value whic The most basic ones are simply accessing an operand, either directly or by way of a type cast. ```k - syntax Evaluation ::= Rvalue + rule rvalueUse(OPERAND) => #readOperand(OPERAND) ... - rule rvalueUse(OPERAND) => OPERAND ... - - rule rvalueCast(CASTKIND, OPERAND, TY) => #cast(OPERAND, CASTKIND, TY) ... + rule rvalueCast(CASTKIND, OPERAND, TY) => #readOperand(OPERAND) ~> #cast(CASTKIND, TY) ... ``` A number of unary and binary operations exist, (which are dependent on the operand types). @@ -375,7 +374,7 @@ Tuples and structs are built as `Aggregate` values with a list of argument value rule ARGS:List ~> #mkAggregate(_) => - typedValue(Aggregate(ARGS), TyUnknown, mutabilityNot) + typedLocal(Aggregate(ARGS), TyUnknown, mutabilityNot) // NB ty not determined ^^^^^^^^^ ... @@ -392,11 +391,11 @@ Tuples and structs are built as `Aggregate` values with a list of argument value rule #readOperandsAux(ACC, OP:Operand REST) => - OP ~> #readOn(ACC, REST) + #readOperand(OP) ~> #readOn(ACC, REST) ... - rule VAL:TypedValue ~> #readOn(ACC, REST) + rule VAL:TypedLocal ~> #readOn(ACC, REST) => #readOperandsAux(ACC ListItem(VAL), REST) ... @@ -417,7 +416,7 @@ The `BorrowKind` indicates mutability of the value through the reference, but al ```k rule rvalueRef(_REGION, KIND, PLACE) => - typedValue(Reference(0, PLACE, #mutabilityOf(KIND)), TyUnknown, #mutabilityOf(KIND)) + typedLocal(Reference(0, PLACE, #mutabilityOf(KIND)), TyUnknown, #mutabilityOf(KIND)) ... @@ -443,14 +442,7 @@ cast from a `TypedLocal` to another when it is followed by a `#cast` item, rewriting `typedLocal(...) ~> #cast(...) ~> REST` to `typedLocal(...) ~> REST`. ```k - syntax KItem ::= #cast( Evaluation, CastKind, Ty ) [strict(1)] - - syntax MIRError ::= CastError - - syntax CastError ::= UnknownCastTarget ( Ty , Map ) - | UnexpectedCastTarget ( CastKind, RigidTy ) - | UnexpectedCastArgument ( TypedLocal, CastKind ) - | CastNotimplemented ( CastKind ) + syntax KItem ::= #cast( CastKind, Ty ) endmodule ``` @@ -494,6 +486,8 @@ High-level values can be - references to a place in the current or an enclosing stack frame - arrays and slices (with homogenous element types) +**This sort is work in progress and will be extended and modified as we go** + ```k module RT-DATA-HIGH-SYNTAX imports RT-DATA-SYNTAX @@ -614,10 +608,9 @@ bit width, signedness, and possibly truncating or 2s-complementing the value. ```k // int casts - rule #cast(typedValue(Integer(VAL, WIDTH, _SIGNEDNESS), _, MUT), castKindIntToInt, TY) + rule typedLocal(Integer(VAL, WIDTH, _SIGNEDNESS), _, MUT) ~> #cast(castKindIntToInt, TY) ~> CONT => - typedValue(#intAsType(VAL, WIDTH, #numTypeOf({TYPEMAP[TY]}:>RigidTy)), TY, MUT) - ... + typedLocal(#intAsType(VAL, WIDTH, #numTypeOf({TYPEMAP[TY]}:>RigidTy)), TY, MUT) ~> CONT TYPEMAP requires #isIntType({TYPEMAP[TY]}:>RigidTy) @@ -671,7 +664,7 @@ bit width, signedness, and possibly truncating or 2s-complementing the value. requires #bitWidth(INTTYPE) <=Int WIDTH [preserves-definedness] // positive shift, divisor non-zero - // widening: nothing to do: VAL does not change (enough bits to represent, no sign change possible) + // widening: nothing to do: VAL does change (enough bits to represent, no sign change possible) rule #intAsType(VAL, WIDTH, INTTYPE:IntTy) => Integer(VAL, #bitWidth(INTTYPE), true) @@ -698,53 +691,67 @@ Error cases for `castKindIntToInt` * value is not a `Integer` ```k - rule #cast(_, castKindIntToInt, TY) => UnknownCastTarget(TY, TYPEMAP) ... - TYPEMAP + rule (_:TypedLocal ~> #cast(castKindIntToInt, TY) ~> _CONT) #as STUFF + => + #LocalError(Unsupported("Int-to-Int type cast to unknown type")) ~> STUFF + + TYPEMAP + requires notBool isRigidTy(TYPEMAP[TY]) - rule #cast(_, castKindIntToInt, TY) => UnexpectedCastTarget(castKindIntToInt, {TYPEMAP[TY]}:>RigidTy) ... - TYPEMAP + rule (_:TypedLocal ~> #cast(castKindIntToInt, TY) ~> _CONT) #as STUFF + => + #LocalError(Unsupported("Int-to-Int type cast to unexpected non-int type")) ~> STUFF + + TYPEMAP requires notBool (#isIntType({TYPEMAP[TY]}:>RigidTy)) - rule #cast(NONINT, castKindIntToInt, _TY) => UnexpectedCastArgument(NONINT, castKindIntToInt) ... + rule (_:TypedLocal ~> #cast(castKindIntToInt, _TY) ~> _CONT) #as STUFF + => + #LocalError(Unsupported("Int-to-Int type cast of non-int value")) ~> STUFF + [owise] ``` -Other type casts are not implemented yet. + +**TODO** Other type casts are not implemented. ```k - rule #cast(_, CASTKIND, _TY) => CastNotimplemented(CASTKIND)... + rule (_:TypedLocal ~> #cast(CASTKIND, _TY) ~> _CONT) #as STUFF + => + #LocalError(Unsupported("Type casts not implemented")) ~> STUFF + requires CASTKIND =/=K castKindIntToInt [owise] ``` ### Projections on `TypedLocal` values -The implementation of projections (a list `ProjectionElems`) accesses the structure of a stored value and therefore depends on the value representation. Function `#readProjection ( TypedValue , Projectionelems) -> TypedLocal` is therefore implemented in the more specific module that provides a `Value` implementation. +The implementation of projections (a list `ProjectionElems`) accesses the structure of a stored value and therefore depends on the value representation. Function `#readProjection ( TypedLocal , Projectionelems) -> TypedLocal` is therefore implemented in the more specific module that provides a `Value` implementation. #### Reading data from places with projections The `ProjectionElems` list contains a sequence of projections which is applied (left-to-right) to the value in a `TypedLocal` to obtain a derived value or component thereof. The `TypedLocal` argument is there for the purpose of recursion over the projections. We don't expect the operation to apply to an empty projection `.ProjectionElems`, the base case exists for the recursion. ```k - // syntax KItem ::= #readProjection ( TypedValue , ProjectionElems ) - rule #readProjection(VAL, .ProjectionElems) => VAL ... + // syntax KItem ::= #readProjection ( TypedLocal , ProjectionElems ) + rule #readProjection(TL, .ProjectionElems) => TL ... ``` A `Field` access projection operates on `struct`s and tuples, which are represented as `Aggregate` values. The field is numbered from zero (in source order), and the field type is provided (not checked here). ```k rule #readProjection( - typedValue(Aggregate(ARGS), _, _), + typedLocal(Aggregate(ARGS), _, _), projectionElemField(fieldIdx(I), _TY) PROJS ) => - #readProjection({ARGS[I]}:>TypedValue, PROJS) + #readProjection({ARGS[I]}:>TypedLocal, PROJS) ... requires 0 <=Int I andBool I #readProjection( - typedValue(Reference(0, place(local(I:Int), PLACEPROJS:ProjectionElems), _), _, _), + typedLocal(Reference(0, place(local(I:Int), PLACEPROJS:ProjectionElems), _), _, _), projectionElemDeref PROJS:ProjectionElems ) => - #readProjection({LOCALS[I]}:>TypedValue, appendP(PLACEPROJS, PROJS)) + #readProjection({LOCALS[I]}:>TypedLocal, appendP(PLACEPROJS, PROJS)) ... LOCALS requires 0 TAIL @@ -781,25 +786,19 @@ An important prerequisite of this rule is that when passing references to a call ```k rule #readProjection( - typedValue(Reference(FRAME, place(LOCAL:Local, PLACEPROJS), _), _, _), + typedLocal(Reference(FRAME, place(LOCAL:Local, PLACEPROJS), _), _, _), projectionElemDeref PROJS ) => - #readProjection( - {#localFromFrame({STACK[FRAME -Int 1]}:>StackFrame, LOCAL, FRAME)}:>TypedValue, - appendP(PLACEPROJS, PROJS) - ) + #readProjection(#localFromFrame({STACK[FRAME -Int 1]}:>StackFrame, LOCAL, FRAME), appendP(PLACEPROJS, PROJS)) ... STACK requires 0 StackFrame, LOCAL, FRAME)) [preserves-definedness] // valid list indexing checked - // TODO case of MovedLocal and NewLocal - syntax TypedLocal ::= #localFromFrame ( StackFrame, Local, Int ) [function] rule #localFromFrame(StackFrame(... locals: LOCALS), local(I:Int), OFFSET) => #adjustRef({LOCALS[I]}:>TypedLocal, OFFSET) @@ -812,8 +811,8 @@ An important prerequisite of this rule is that when passing references to a call | #decrementRef ( TypedLocal ) [function, total] | #adjustRef (TypedLocal, Int ) [function, total] - rule #adjustRef(typedValue(Reference(HEIGHT, PLACE, REFMUT), TY, MUT), OFFSET) - => typedValue(Reference(HEIGHT +Int OFFSET, PLACE, REFMUT), TY, MUT) + rule #adjustRef(typedLocal(Reference(HEIGHT, PLACE, REFMUT), TY, MUT), OFFSET) + => typedLocal(Reference(HEIGHT +Int OFFSET, PLACE, REFMUT), TY, MUT) rule #adjustRef(TL, _) => TL [owise] rule #incrementRef(TL) => #adjustRef(TL, 1) @@ -841,15 +840,13 @@ The solution is to use rewrite operations in a downward pass through the project syntax Contexts ::= List{Context, ""} rule #buildUpdate(VAL, .Contexts) => VAL - [preserves-definedness] rule #buildUpdate(VAL, CtxField(TY, ARGS, I) CTXS) - => #buildUpdate(typedValue(Aggregate(ARGS[I <- VAL]), TY, mutabilityMut), CTXS) - [preserves-definedness] // valid list indexing checked upon context construction + => #buildUpdate(typedLocal(Aggregate(ARGS[I <- VAL]), TY, mutabilityMut), CTXS) rule #projectedUpdate( DEST, - typedValue(Aggregate(ARGS), TY, MUT), + typedLocal(Aggregate(ARGS), TY, MUT), projectionElemField(fieldIdx(I), _) PROJS, UPDATE, CTXTS, @@ -862,11 +859,11 @@ The solution is to use rewrite operations in a downward pass through the project andBool I #projectedUpdate( _DEST, - typedValue(Reference(OFFSET, place(LOCAL, PLACEPROJ), MUT), _, _), + typedLocal(Reference(OFFSET, place(LOCAL, PLACEPROJ), MUT), _, _), projectionElemDeref PROJS, UPDATE, _CTXTS, @@ -892,7 +889,7 @@ The solution is to use rewrite operations in a downward pass through the project rule #projectedUpdate( _DEST, - typedValue(Reference(OFFSET, place(local(I), PLACEPROJ), MUT), _, _), + typedLocal(Reference(OFFSET, place(local(I), PLACEPROJ), MUT), _, _), projectionElemDeref PROJS, UPDATE, _CTXTS, @@ -918,22 +915,20 @@ The solution is to use rewrite operations in a downward pass through the project rule #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, false) => - #setLocalValue(place(local(I), .ProjectionElems), #buildUpdate(NEW, CONTEXTS)) + #buildUpdate(NEW, CONTEXTS) ~> #setLocalValue(place(local(I), .ProjectionElems)) ... - [preserves-definedness] // valid conmtext ensured upon context construction rule #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, true) => - #forceSetLocal(local(I), #buildUpdate(NEW, CONTEXTS)) + #buildUpdate(NEW, CONTEXTS) ~> #forceSetLocal(local(I)) ... - [preserves-definedness] // valid conmtext ensured upon context construction - syntax KItem ::= #forceSetLocal ( Local , TypedLocal ) + syntax KItem ::= #forceSetLocal ( Local ) // #forceSetLocal sets the given value unconditionally (to write Moved values) - rule #forceSetLocal(local(I), VALUE) + rule VALUE:TypedLocal ~> #forceSetLocal(local(I)) => .K ... @@ -962,8 +957,8 @@ The solution is to use rewrite operations in a downward pass through the project andBool I StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)]) + rule #updateStackLocal(StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS), I, typedLocal(VAL, _, _)) + => StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)]) requires 0 <=Int I andBool I #setLocalValue(place(local(I), PROJ), VAL) + rule VAL ~> #setLocalValue(place(local(I), PROJ)) => #projectedUpdate(toLocal(I), {LOCALS[I]}:>TypedLocal, PROJ, VAL, .Contexts, false) ... @@ -985,7 +980,7 @@ We could first read the original value using `#readProjection` and compare the t requires 0 <=Int I andBool I operandMove(place(local(I) #as LOCAL, PROJECTIONS)) + rule #readOperand(operandMove(place(local(I) #as LOCAL, PROJECTIONS))) => // read first, then write moved marker (use type from before) - #readProjection({LOCALS[I]}:>TypedValue, PROJECTIONS) ~> + #readProjection({LOCALS[I]}:>TypedLocal, PROJECTIONS) ~> #markMoved({LOCALS[I]}:>TypedLocal, LOCAL, PROJECTIONS) ... @@ -1005,11 +1000,9 @@ Reading `Moved` operands requires a write operation to the read place, too, howe requires PROJECTIONS =/=K .ProjectionElems andBool 0 <=Int I andBool I VAL:TypedLocal ~> #markMoved(OLDLOCAL, local(I), PROJECTIONS) ~> CONT @@ -1034,25 +1027,51 @@ This is specific to Stable MIR, the MIR AST instead uses `WithOverflow` as t For binary operations generally, both arguments have to be read from the provided operands, followed by checking the types and then performing the actual operation (both implemented in `#compute`), which can return a `TypedLocal` or an error. A flag carries the information whether to perform an overflow check through to this function for `CheckedBinaryOp`. ```k - syntax KItem ::= #compute ( BinOp, Evaluation, Evaluation, Bool) [seqstrict(2,3)] + syntax KItem ::= #suspend ( BinOp, Operand, Bool) + | #ready ( BinOp, TypedLocal, Bool ) + | #compute ( BinOp, TypedLocal, TypedLocal, Bool ) [function, total] + + rule rvalueBinaryOp(BINOP, OP1, OP2) + => + #readOperand(OP1) ~> #suspend(BINOP, OP2, false) + ... + - rule rvalueBinaryOp(BINOP, OP1, OP2) => #compute(BINOP, OP1, OP2, false) ... + rule rvalueCheckedBinaryOp(BINOP, OP1, OP2) + => + #readOperand(OP1) ~> #suspend(BINOP, OP2, true) + ... + - rule rvalueCheckedBinaryOp(BINOP, OP1, OP2) => #compute(BINOP, OP1, OP2, true) ... + rule ARG1:TypedLocal ~> #suspend(BINOP, OP2, CHECKFLAG) + => + #readOperand(OP2) ~> #ready(BINOP, ARG1, CHECKFLAG) + ... + + + rule ARG2:TypedLocal ~> #ready(BINOP, ARG1,CHECKFLAG) + => + #compute(BINOP, ARG1, ARG2, CHECKFLAG) + ... + ``` There are also a few _unary_ operations (`UnOpNot`, `UnOpNeg`, `UnOpPtrMetadata`) used in `RValue:UnaryOp`. These operations only read a single operand and do not need a `#suspend` helper. ```k - syntax KItem ::= #applyUnOp ( UnOp , Evaluation ) [strict(2)] + syntax KItem ::= #applyUnOp ( UnOp ) - rule rvalueUnaryOp(UNOP, OP1) => #applyUnOp(UNOP, OP1) ... + rule rvalueUnaryOp(UNOP, OP1) + => + #readOperand(OP1) ~> #applyUnOp(UNOP) + ... + ``` #### Potential errors ```k - syntax MIRError ::= OperationError + syntax KItem ::= #OperationError( OperationError ) syntax OperationError ::= TypeMismatch ( BinOp, Ty, Ty ) | OperandMismatch ( BinOp, Value, Value ) @@ -1060,22 +1079,19 @@ There are also a few _unary_ operations (`UnOpNot`, `UnOpNeg`, `UnOpPtrMetadata` | OperandMismatch ( UnOp, Value ) | OperandError( UnOp, TypedLocal) // errors above are compiler bugs or invalid MIR - | OpNotimplemented ( BinOp, TypedValue, TypedValue) + | Unimplemented ( BinOp, TypedLocal, TypedLocal) // errors below are program errors | "DivisionByZero" - | "Overflow_U_B" - - // catch Moved or uninitialised operands - rule #compute(OP, ARG1, ARG2, _FLAG) => OperandError(OP, ARG1, ARG2) - requires notBool (isTypedValue(ARG1) andBool isTypedValue(ARG2)) + | "Overflow_U_B" // better than getting stuck - rule #applyUnOp(OP, ARG) => OperandError(OP, ARG) - requires notBool isTypedValue(ARG) + // catch pathological cases where ARG1 or ARG2, or both, are Moved or NoValue. + rule #compute(OP, ARG1, ARG2, _FLAG) => #OperationError(OperandError(OP, ARG1, ARG2)) + requires notBool (hasValue(ARG1) andBool hasValue(ARG2)) // catch-all rule to make `#compute` total - rule #compute(OP, ARG1, ARG2, _FLAG) => OpNotimplemented(OP, ARG1, ARG2) - requires isTypedValue(ARG1) - andBool isTypedValue(ARG2) + rule #compute(OP, ARG1, ARG2, _FLAG) + => + #OperationError(Unimplemented(OP, ARG1, ARG2)) [owise] ``` @@ -1122,22 +1138,75 @@ The arithmetic operations require operands of the same numeric type. requires Y =/=Int 0 // operation undefined otherwise - // Checked operations return a pair of the truncated value and an overflow flag - // signed numbers: must check for wrap-around (operation specific) rule #compute( BOP, - typedValue(Integer(ARG1, WIDTH, true), TY, _), //signed - typedValue(Integer(ARG2, WIDTH, true), TY, _), - true) // checked + typedLocal(Integer(ARG1, WIDTH, SIGNEDNESS), TY, _), + typedLocal(Integer(ARG2, WIDTH, SIGNEDNESS), TY, _), + CHK) => - typedValue( + #arithmeticInt(BOP, ARG1, ARG2, WIDTH, SIGNEDNESS, TY, CHK) + requires isArithmetic(BOP) + [preserves-definedness] + + // error cases: + // non-scalar arguments + rule #compute(BOP, typedLocal(ARG1, TY, _), typedLocal(ARG2, TY, _), _) + => + #OperationError(OperandMismatch(BOP, ARG1, ARG2)) + requires isArithmetic(BOP) + [owise] + + // different argument types + rule #compute(BOP, typedLocal(_, TY1, _), typedLocal(_, TY2, _), _) + => + #OperationError(TypeMismatch(BOP, TY1, TY2)) + requires TY1 =/=K TY2 + andBool isArithmetic(BOP) + [owise] + + // helper function to truncate int values + syntax Int ::= truncate(Int, Int, Signedness) [function, total] + // ------------------------------------------------------------- + // unsigned values can be truncated using a simple bitmask + // NB if VAL is negative (underflow), the truncation will yield a positive number + rule truncate(VAL, WIDTH, Unsigned) + => // mask with relevant bits + VAL &Int ((1 < VAL // shortcut when there is nothing to do + requires 0 // bit-based truncation, then establishing the sign by subtracting a bias + (VAL &Int ((1 <=Int (1 < + typedLocal( Aggregate( - ListItem(typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot)) + ListItem(typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot)) ListItem( - typedValue( + typedLocal( BoolVal( - // overflow: compare with and without truncation - truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed) =/=Int onInt(BOP, ARG1, ARG2) + // overflow: Result outside valid range + (1 < - typedValue( + typedLocal( Aggregate( - ListItem(typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot)) + ListItem(typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot)) ListItem( - typedValue( + typedLocal( BoolVal( - // overflow flag: compare to truncated result + // overflow flag: true if infinite precision result is not equal to truncated result truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned) =/=Int onInt(BOP, ARG1, ARG2) ), TyUnknown, @@ -1177,125 +1243,53 @@ The arithmetic operations require operands of the same numeric type. requires isArithmetic(BOP) [preserves-definedness] - // Unchecked operations signal undefined behaviour on overflow. The checks are the same as for the flags above. + // performing unchecked operations may result in undefined behaviour, which we signal. + // The check it the same as the one for the overflow flag above - rule #compute( - BOP, - typedValue(Integer(ARG1, WIDTH, true), TY, _), // signed - typedValue(Integer(ARG2, WIDTH, true), TY, _), - false) // unchecked - => typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + rule #arithmeticInt(BOP, ARG1, ARG2, WIDTH, true, TY, false) + => typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot) requires isArithmetic(BOP) // infinite precision result must equal truncated result andBool truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed) ==Int onInt(BOP, ARG1, ARG2) [preserves-definedness] // unsigned numbers: simple overflow check using a bit mask - rule #compute( - BOP, - typedValue(Integer(ARG1, WIDTH, false), TY, _), // unsigned - typedValue(Integer(ARG2, WIDTH, false), TY, _), - false) // unchecked - => typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) + rule #arithmeticInt(BOP, ARG1, ARG2, WIDTH, false, TY, false) + => typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) requires isArithmetic(BOP) // infinite precision result must equal truncated result andBool truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned) ==Int onInt(BOP, ARG1, ARG2) [preserves-definedness] - // lower-priority rule to catch undefined behaviour - rule #compute( - BOP, - typedValue(Integer(_, WIDTH, SIGNEDNESS), TY, _), - typedValue(Integer(_, WIDTH, SIGNEDNESS), TY, _), - false) // unchecked - => Overflow_U_B + rule #arithmeticInt(BOP, _, _, _, _, _, false) => #OperationError(Overflow_U_B) requires isArithmetic(BOP) - [priority(60)] + [owise] // These are additional high priority rules to detect/report divbyzero and div/rem overflow/underflow // (the latter can only happen for signed Ints with dividend minInt and divisor -1 - rule #compute(binOpDiv, _, typedValue(Integer(DIVISOR, _, _), _, _), _) + rule #arithmeticInt(binOpDiv, _, DIVISOR, _, _, _, _) => - DivisionByZero + #OperationError(DivisionByZero) requires DIVISOR ==Int 0 [priority(40)] - - rule #compute(binOpRem, _, typedValue(Integer(DIVISOR, _, _), _, _), _) + rule #arithmeticInt(binOpRem, _, DIVISOR, _, _, _, _) => - DivisionByZero + #OperationError(DivisionByZero) requires DIVISOR ==Int 0 [priority(40)] - rule #compute( - binOpDiv, - typedValue(Integer(DIVIDEND, WIDTH, true), TY, _), // signed - typedValue(Integer(DIVISOR, WIDTH, true), TY, _), - _) + rule #arithmeticInt(binOpDiv, DIVIDEND, DIVISOR, WIDTH, true, _, _) => - Overflow_U_B + #OperationError(Overflow_U_B) requires DIVISOR ==Int -1 andBool DIVIDEND ==Int 0 -Int (1 < - Overflow_U_B + #OperationError(Overflow_U_B) requires DIVISOR ==Int -1 andBool DIVIDEND ==Int 0 -Int (1 < - OperandMismatch(BOP, ARG1, ARG2) - requires isArithmetic(BOP) - [owise] - - // different argument types - rule #compute(BOP, typedValue(_, TY1, _), typedValue(_, TY2, _), _) - => - TypeMismatch(BOP, TY1, TY2) - requires TY1 =/=K TY2 - andBool isArithmetic(BOP) - [owise] - - - // helper function to truncate int values - syntax Int ::= truncate(Int, Int, Signedness) [function, total] - // ------------------------------------------------------------- - // unsigned values can be truncated using a simple bitmask - // NB if VAL is negative (underflow), the truncation will yield a positive number - rule truncate(VAL, WIDTH, Unsigned) - => // mask with relevant bits - VAL &Int ((1 < VAL // shortcut when there is nothing to do - requires 0 // if truncated value small enough and positive, all is done - (VAL &Int ((1 < // subtract a bias when the truncation result too large - (VAL &Int ((1 <=Int (1 < cmpOpBool(binOpLe, Y, X) rule cmpOpBool(binOpGt, X, Y) => cmpOpBool(binOpLt, Y, X) - rule #compute(OP, typedValue(_, TY, _), typedValue(_, TY2, _), _) => TypeMismatch(OP, TY, TY2) + rule #compute(OP, typedLocal(_, TY, _), typedLocal(_, TY2, _), _) => #OperationError(TypeMismatch(OP, TY, TY2)) requires isComparison(OP) andBool TY =/=K TY2 - rule #compute(OP, typedValue(Integer(VAL1, WIDTH, SIGN), TY, _), typedValue(Integer(VAL2, WIDTH, SIGN), TY, _), _) + rule #compute(OP, typedLocal(Integer(VAL1, WIDTH, SIGN), TY, _), typedLocal(Integer(VAL2, WIDTH, SIGN), TY, _), _) => - typedValue(BoolVal(cmpOpInt(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) + typedLocal(BoolVal(cmpOpInt(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) requires isComparison(OP) - [preserves-definedness] // OP known to be a comparison - rule #compute(OP, typedValue(BoolVal(VAL1), TY, _), typedValue(BoolVal(VAL2), TY, _), _) + rule #compute(OP, typedLocal(BoolVal(VAL1), TY, _), typedLocal(BoolVal(VAL2), TY, _), _) => - typedValue(BoolVal(cmpOpBool(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) + typedLocal(BoolVal(cmpOpBool(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) requires isComparison(OP) - [preserves-definedness] // OP known to be a comparison - rule #compute(OP, typedValue(ARG1, TY, _), typedValue(ARG2, TY, _), _) + rule #compute(OP, typedLocal(ARG1, TY, _), typedLocal(ARG2, TY, _), _) => - OperandMismatch(OP, ARG1, ARG2) - requires isComparison(OP) + #OperationError(OperandMismatch(OP, ARG1, ARG2)) [owise] ``` @@ -1367,13 +1358,14 @@ The `binOpCmp` operation returns `-1`, `0`, or `+1` (the behaviour of Rust's `st rule cmpBool(X, Y) => 0 requires X ==Bool Y rule cmpBool(X, Y) => 1 requires X andBool notBool Y - rule #compute(binOpCmp, typedValue(Integer(VAL1, WIDTH, SIGN), TY, _), typedValue(Integer(VAL2, WIDTH, SIGN), TY, _), _) + rule #compute(binOpCmp, typedLocal(Integer(VAL1, WIDTH, SIGN), TY, _), typedLocal(Integer(VAL2, WIDTH, SIGN), TY, _), _) => - typedValue(Integer(cmpInt(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) + typedLocal(Integer(cmpInt(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) - rule #compute(binOpCmp, typedValue(BoolVal(VAL1), TY, _), typedValue(BoolVal(VAL2), TY, _), _) + rule #compute(binOpCmp, typedLocal(BoolVal(VAL1), TY, _), typedLocal(BoolVal(VAL2), TY, _), _) => - typedValue(Integer(cmpBool(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) + typedLocal(Integer(cmpBool(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) + ``` #### Unary operations on Boolean and integral values @@ -1382,9 +1374,9 @@ The `unOpNeg` operation only works signed integral (and floating point) numbers. An overflow can happen when negating the minimal representable integral value (in the given `WIDTH`). The semantics of the operation in this case is to wrap around (with the given bit width). ```k - rule #applyUnOp(unOpNeg, typedValue(Integer(VAL, WIDTH, true), TY, _)) + rule typedLocal(Integer(VAL, WIDTH, true), TY, _) ~> #applyUnOp(unOpNeg) => - typedValue(Integer(truncate(0 -Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + typedLocal(Integer(truncate(0 -Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) ... @@ -1394,27 +1386,27 @@ An overflow can happen when negating the minimal representable integral value (i The `unOpNot` operation works on boolean and integral values, with the usual semantics for booleans and a bitwise semantics for integral values (overflows cannot occur). ```k - rule #applyUnOp(unOpNot, typedValue(BoolVal(VAL), TY, _)) + rule typedLocal(BoolVal(VAL), TY, _) ~> #applyUnOp(unOpNot) => - typedValue(BoolVal(notBool VAL), TY, mutabilityNot) + typedLocal(BoolVal(notBool VAL), TY, mutabilityNot) ... - rule #applyUnOp(unOpNot, typedValue(Integer(VAL, WIDTH, true), TY, _)) + rule typedLocal(Integer(VAL, WIDTH, true), TY, _) ~> #applyUnOp(unOpNot) => - typedValue(Integer(truncate(~Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + typedLocal(Integer(truncate(~Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) ... - rule #applyUnOp(unOpNot, typedValue(Integer(VAL, WIDTH, false), TY, _)) + rule typedLocal(Integer(VAL, WIDTH, false), TY, _) ~> #applyUnOp(unOpNot) => - typedValue(Integer(truncate(~Int VAL, WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) + typedLocal(Integer(truncate(~Int VAL, WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) ... ``` ```k - rule #applyUnOp(OP, typedValue(VAL, _, _)) => OperandMismatch(OP, VAL) ... + rule typedLocal(VAL, _, _) ~> #applyUnOp(OP) => #OperationError(OperandMismatch(OP, VAL)) ... [owise] ``` @@ -1436,7 +1428,7 @@ The `unOpNot` operation works on boolean and integral values, with the usual sem One important use case of `UbChecks` is to determine overflows in unchecked arithmetic operations. Since our arithmetic operations signal undefined behaviour on overflow independently, the value returned by `UbChecks` is `false` for now. ```k - rule rvalueNullaryOp(nullOpUbChecks, _) => typedValue(BoolVal(false), TyUnknown, mutabilityNot) ... + rule rvalueNullaryOp(nullOpUbChecks, _) => typedLocal(BoolVal(false), TyUnknown, mutabilityNot) ... ``` #### "Nullary" operations reifying type information diff --git a/kmir/src/kmir/parse/notes.md b/kmir/src/kmir/parse/notes.md index df79d454f..f242edbef 100644 --- a/kmir/src/kmir/parse/notes.md +++ b/kmir/src/kmir/parse/notes.md @@ -36,7 +36,7 @@ json: an array of integer values between 0 and 255 syntax Elems ::= List {Elem, ""} [group(mir-list), ...] ``` json: a homogeneous list, e.g. `[e1, e2, e3, ...]`, where all elements correspond to syntactic productions for the sort `Elem`. -As per naming convention, the list sort `Elems` (plural) should contain elements of sort `Elem` (singular). Usual plural formation rules (`Branch -> Branches`) are respected. +As per naming convention, the list sort `Elems` (plural) should contain elements of sort `Elem` (singular). Usual plural formation rules (`Body -> Bodies`, `Branch -> Branches`) are respected. #### mir-klist-ElementSort ``` diff --git a/kmir/src/kmir/parse/parser.py b/kmir/src/kmir/parse/parser.py index 453a9becd..4050b0714 100644 --- a/kmir/src/kmir/parse/parser.py +++ b/kmir/src/kmir/parse/parser.py @@ -113,7 +113,7 @@ def _list_symbols(sort: str) -> tuple[str, str]: # Given a list Sort, return the element sort. def _element_sort(sort: KSort) -> KSort: name = sort.name - if name.endswith('ies'): # Entries, ... + if name.endswith('ies'): # Bodies, Entries, ... return KSort(name[:-3] + 'y') elif ( # -es for words ending in 's', 'ch', 'sh', 'ss', 'x' or 'z' name.endswith('ses') diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json index 212c5f2aa..0440b6464 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json @@ -1,3652 +1,3678 @@ { - "name": "arithmetic_unchecked_runs", - "crate_id": 13794361957699792544, - "allocs": [ - [ - 3, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 117, - 56, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 97, - 100, - 100, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 2, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 56, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 117, - 98, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 31, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE" - } - ], - [ - 38, - { - "NoOpSym": "" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE" - } - ], - [ - 27, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE" - } - ], - [ - 23, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h3a5ca15c2000251eE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E" - } - ], - [ - 29, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] + "name": "arithmetic_unchecked_runs", + "crate_id": 13794361957699792544, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 56, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 117, + 98, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 + "align": 1, + "mutability": "Not" } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 117, + 56, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 97, + 100, + 100, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 + "align": 1, + "mutability": "Not" } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + } + ] + ], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE" + } + ], + [ + 29, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE" + } + ], + [ + 23, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h3a5ca15c2000251eE" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E" + } + ], + [ + 41, + { + "NoOpSym": "" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E" + } + ], + [ + 31, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start17h665493b8ec74817bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, { - "Field": [ - 0, - 15 - ] + "ty": 8, + "span": 11, + "mutability": "Not" }, { - "Field": [ - 0, - 9 - ] + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 9, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 97, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 + } + }, + "details": null + }, + { + "symbol_name": "_ZN25arithmetic_unchecked_runs4main17h1bc17631fcb9d7bbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 10, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 101, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 14 + } + } + }, + { + "Constant": { + "span": 102, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 14 + } + } + } + ] + } + ] + }, + "span": 103 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 101, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 14 + } + } + }, + { + "Constant": { + "span": 102, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 14 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 103 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 103 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 104, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 15 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 105, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 16 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 106 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Constant": { + "span": 107, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 17 + } + } + }, + { + "Constant": { + "span": 108, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 18 + } + } + } + ] + } + ] + }, + "span": 109 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Constant": { + "span": 107, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 17 + } + } + }, + { + "Constant": { + "span": 108, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 18 + } + } + } + ] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 109 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 109 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 110, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "span": 111, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 20 + } + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 112 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 114 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 115 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 8, + "projection": [] + } + }, + { + "Copy": { + "local": 9, + "projection": [] + } + } + ] + } + ] + }, + "span": 113 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 10, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Move": { + "local": 9, + "projection": [] + } + } + ] + }, + "target": 5, + "unwind": "Continue" + } + }, + "span": 113 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 10, + "projection": [ + { + "Field": [ + 0, + 35 + ] + } + ] + } + } + } + ] + }, + "span": 113 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 117 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 7, + "projection": [] + } + }, + { + "Copy": { + "local": 12, + "projection": [] + } + } + ] + } + ] + }, + "span": 116 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 7, + "projection": [] + } + }, + { + "Move": { + "local": 12, + "projection": [] + } + } + ] + }, + "target": 6, + "unwind": "Continue" + } + }, + "span": 116 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 0, + 35 + ] + } + ] + } + } + } + ] + }, + "span": 116 + } + ], + "terminator": { + "kind": "Return", + "span": 118 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 119, "mutability": "Mut" - } }, - "ty": 17, - "id": 13 - } - } - } - } - ] - }, - "span": 97 - } - ], - "terminator": { - "kind": "Return", - "span": 96 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 98, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 99, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 99, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 100 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 2 - ] + { + "ty": 9, + "span": 120, + "mutability": "Not" + }, + { + "ty": 28, + "span": 103, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 121, + "mutability": "Not" + }, + { + "ty": 2, + "span": 122, + "mutability": "Not" + }, + { + "ty": 26, + "span": 109, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 123, + "mutability": "Not" + }, + { + "ty": 35, + "span": 124, + "mutability": "Not" + }, + { + "ty": 35, + "span": 114, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 115, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 113, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 125, + "mutability": "Not" + }, + { + "ty": 35, + "span": 117, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 116, + "mutability": "Mut" } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 120, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 121, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 122, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 123, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 124, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 7, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 125, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] + ], + "spread_arg": null, + "span": 126 } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 + ] } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 66, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } } - }, - "ty": 24, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 25, - "span": 62, - "mutability": "Not" - }, - { - "ty": 2, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 26, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "SubUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 2, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 51, - "mutability": "Not" - }, - { - "ty": 2, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 94 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 94, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 12 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 94 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" - }, - { - "ty": 32, - "span": 94, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add::precondition_check", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 80 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 81 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 81 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 9 - ] + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 82 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - ] - } - } + ], + "spread_arg": null, + "span": 42 } - ] - }, - "span": 83 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 84 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 79 + ] } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 86, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 66, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h675110f50b410d54E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 94, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 11 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } } - }, - "ty": 24, - "id": 10 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 87 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 88 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 89, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 90, - "mutability": "Not" - }, - { - "ty": 9, - "span": 90, - "mutability": "Not" - }, - { - "ty": 25, - "span": 87, - "mutability": "Not" - }, - { - "ty": 9, - "span": 82, - "mutability": "Not" - }, - { - "ty": 21, - "span": 83, - "mutability": "Not" - }, - { - "ty": 28, - "span": 81, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 90, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 90, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 91, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 92, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 82, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 83, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 93 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 69 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] + ], + "locals": [ + { + "ty": 16, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 69 + ] } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 70, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub::precondition_check", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 8 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 25, + "span": 62, + "mutability": "Not" + }, + { + "ty": 2, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 26, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 71 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "AddUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add::precondition_check", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 80 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 81 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 81 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 82 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 84 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 79 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 86, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 10 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 87 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 88 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 89, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 90, + "mutability": "Not" + }, + { + "ty": 9, + "span": 90, + "mutability": "Not" + }, + { + "ty": 25, + "span": 87, + "mutability": "Not" + }, + { + "ty": 9, + "span": 82, + "mutability": "Not" + }, + { + "ty": 21, + "span": 83, + "mutability": "Not" + }, + { + "ty": 28, + "span": 81, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 90, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 90, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 91, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 92, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 82, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 83, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 93 } - ] - }, - "span": 74 - } - ], - "terminator": { - "kind": "Return", - "span": 72 + ] } - } - ], - "locals": [ - { - "ty": 9, - "span": 75, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 76, - "mutability": "Not" - }, - { - "ty": 9, - "span": 77, - "mutability": "Not" - }, - { - "ty": 21, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 71, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 76, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 78 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN25arithmetic_unchecked_runs4main17h1bc17631fcb9d7bbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 10, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 101, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 } - }, - "ty": 9, - "id": 14 - } - } - }, - { - "Constant": { - "span": 102, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - }, - "ty": 9, - "id": 14 } - } - } - ] - } - ] - }, - "span": 103 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 101, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, + ], + "locals": [ + { + "ty": 16, + "span": 28, "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - }, - { - "Constant": { - "span": 102, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 103 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] } - ] - } - } - } - ] - }, - "span": 103 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 104, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 15 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 105, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 } - }, - "ty": 9, - "id": 16 - } - } + ], + "spread_arg": null, + "span": 3 } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 106 + ] } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Constant": { - "span": 107, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h4ef9f89b76c476d3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 8, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 } - }, - "ty": 2, - "id": 17 } - } - }, - { - "Constant": { - "span": 108, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 18 + ], + "locals": [ + { + "ty": 1, + "span": 95, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 95, + "mutability": "Not" } - } - } - ] - } - ] - }, - "span": 109 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 95 } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Constant": { - "span": 107, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 17 - } - } - }, - { - "Constant": { - "span": 108, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 70, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 71 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 73 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "AddUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 74 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, + "terminator": { + "kind": "Return", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 9, + "span": 75, "mutability": "Mut" - } - }, - "ty": 2, - "id": 18 - } - } - } - ] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 109 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 0, - 2 - ] + }, + { + "ty": 9, + "span": 76, + "mutability": "Not" + }, + { + "ty": 9, + "span": 77, + "mutability": "Not" + }, + { + "ty": 21, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 71, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 109 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 110, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Constant": { - "span": 111, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 } - }, - "ty": 2, - "id": 20 - } - } - } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 112 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 114 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 115 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 8, - "projection": [] - } - }, - { - "Copy": { - "local": 9, - "projection": [] - } - } - ] - } - ] - }, - "span": 113 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 10, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] + ], + "spread_arg": null, + "span": 78 } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Move": { - "local": 9, - "projection": [] - } - } - ] - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 113 + ] } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 10, - "projection": [ - { - "Field": [ - 0, - 35 - ] + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } } - ] - } - } - } - ] - }, - "span": 113 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 117 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 7, - "projection": [] - } - }, - { - "Copy": { - "local": 12, - "projection": [] - } - } - ] - } - ] - }, - "span": 116 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 7, - "projection": [] - } - }, - { - "Move": { - "local": 12, - "projection": [] - } - } - ] - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 116 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 0, - 35 - ] + ], + "locals": [ + { + "ty": 1, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" } - ] - } - } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 } - ] - }, - "span": 116 - } - ], - "terminator": { - "kind": "Return", - "span": 118 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 119, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 120, - "mutability": "Not" - }, - { - "ty": 28, - "span": 103, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 121, - "mutability": "Not" - }, - { - "ty": 2, - "span": 122, - "mutability": "Not" - }, - { - "ty": 26, - "span": 109, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 123, - "mutability": "Not" - }, - { - "ty": 35, - "span": 124, - "mutability": "Not" - }, - { - "ty": 35, - "span": 114, - "mutability": "Mut" - }, - { - "ty": 35, - "span": 115, - "mutability": "Mut" - }, - { - "ty": 36, - "span": 113, - "mutability": "Mut" - }, - { - "ty": 35, - "span": 125, - "mutability": "Not" - }, - { - "ty": 35, - "span": 117, - "mutability": "Mut" - }, - { - "ty": 36, - "span": 116, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 120, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 121, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 122, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 123, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 124, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 7, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "f", - "source_info": { - "span": 125, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 11, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 126 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h675110f50b410d54E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 94, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 29, - "id": 11 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 9, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 97, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 13 + } + } + } + } + ] + }, + "span": 97 + } + ], + "terminator": { + "kind": "Return", + "span": 96 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 98, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 99, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 99, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 100 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h4ef9f89b76c476d3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 8, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 95, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 95, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 95 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h665493b8ec74817bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 94 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 94, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 12 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 94 + } } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + ], + "locals": [ + { + "ty": 16, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + }, + { + "ty": 32, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 51, + "mutability": "Not" + }, + { + "ty": 2, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ { - "Downcast": 0 + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 }, { - "Field": [ - 0, - 6 - ] + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 } - ] - } - } + ], + "spread_arg": null, + "span": 53 } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + ] } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - } - ], - "types": [ - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 35, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" + }, + "details": null } - } ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } + "types": [ + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 35, + { + "RigidTy": { + "Int": "I16" + } + } + ] ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ] - ], - "debug": null -} + "debug": null +} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state index 0f2f3f8c5..4dfd2da71 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state @@ -31,23 +31,23 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) @@ -55,16 +55,16 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 97 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 96 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 99 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 84 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 86 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 87 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 88 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) - ty ( 29 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 94 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) ) ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 9 ) , span: span ( 75 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 105 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 109 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 111 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 112 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 115 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 113 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 118 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 116 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 126 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 97 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 96 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 99 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) .Bodies ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 84 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 86 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 87 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 88 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) .Bodies ) + ty ( 29 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 94 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) .Bodies ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 9 ) , span: span ( 75 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) .Bodies ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 10 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 105 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 109 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 111 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 112 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 115 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 113 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 118 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 116 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 126 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json index 4f2cbdca4..587fdfc54 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json @@ -1,2767 +1,2785 @@ { - "name": "arithmetic", - "crate_id": 3562334553558048806, - "allocs": [], - "functions": [ - [ - 20, - { - "IntrinsicSym": "black_box" - } + "name": "arithmetic", + "crate_id": 3562334553558048806, + "allocs": [], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" + } + ], + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ] ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" - } - ], - [ - 33, - { - "NoOpSym": "" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hddd54efbfb63f680E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h408f33832fba4274E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hddd54efbfb63f680E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ + ], + "locals": [ { - "Downcast": 0 + "ty": 1, + "span": 44, + "mutability": "Mut" }, { - "Field": [ - 0, - 6 - ] + "ty": 22, + "span": 44, + "mutability": "Not" } - ] - } - } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN10arithmetic4main17hcd0e28aacae0c2e9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - }, - "ty": 9, - "id": 10 } - } - } - ] - } - ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] } - ] - } - } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 } - }, - "ty": 9, - "id": 11 } - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, + ], + "locals": [ + { + "ty": 1, + "span": 37, "mutability": "Mut" - } - }, - "ty": 9, - "id": 11 - } - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 0, - 9 - ] + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - ] - } - } + ], + "spread_arg": null, + "span": 42 } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 } - }, - "ty": 2, - "id": 12 } - } - }, - { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" } - } - } - ] - } - ] - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 12 - } - } - }, - { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - ] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 0, - 2 - ] + "argument_index": 1 } - ] - } - } + ], + "spread_arg": null, + "span": 49 } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - }, - "ty": 2, - "id": 14 } - } - } - ] - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, + ], + "locals": [ + { + "ty": 16, + "span": 43, "mutability": "Mut" - } - }, - "ty": 2, - "id": 14 - } - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 59 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 0, - 2 - ] + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 9 - ] + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 11, - "projection": [] - } - }, - { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN10arithmetic4main17hcd0e28aacae0c2e9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 + } + } + } + ] + } + ] + }, + "span": 52 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 } - }, - "ty": 9, - "id": 9 - } - } - } - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 12, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Move": { - "local": 11, - "projection": [] - } - }, - { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 11 + } + } + } + ] + } + ] + }, + "span": 54 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 11 + } + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 12 + } + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 + } + } + } + ] + } + ] + }, + "span": 57 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 12 + } + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 + } + } + } + ] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 57 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 14 + } + } + } + ] + } + ] + }, + "span": 59 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 8, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 14 + } + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 59 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 8, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 11, + "projection": [] + } + }, + { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + } + ] + } + ] + }, + "span": 61 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 12, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Move": { + "local": 11, + "projection": [] + } + }, + { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + } + ] + }, + "target": 5, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 12, + "projection": [ + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 63 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + }, + "target": 6, + "unwind": "Continue" + } + }, + "span": 63 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 65 + }, + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 66 + }, + { + "kind": { + "Assign": [ + { + "local": 17, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 15, + "projection": [] + } + }, + { + "Copy": { + "local": 16, + "projection": [] + } + } + ] + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 17, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Move": { + "local": 15, + "projection": [] + } + }, + { + "Move": { + "local": 16, + "projection": [] + } + } + ] + }, + "target": 7, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 17, + "projection": [ + { + "Field": [ + 0, + 26 + ] + } + ] + } + } + } + ] + }, + "span": 64 + }, + { + "kind": { + "Assign": [ + { + "local": 19, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 68 + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 14, + "projection": [] + } + }, + { + "Copy": { + "local": 19, + "projection": [] + } + } + ] + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 20, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 14, + "projection": [] + } + }, + { + "Move": { + "local": 19, + "projection": [] + } + } + ] + }, + "target": 8, + "unwind": "Continue" + } + }, + "span": 67 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 18, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 20, + "projection": [ + { + "Field": [ + 0, + 26 + ] + } + ] + } + } + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 52, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 72, + "mutability": "Not" + }, + { + "ty": 27, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 73, + "mutability": "Not" + }, + { + "ty": 2, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 59, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 74, + "mutability": "Not" + }, + { + "ty": 9, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 75, + "mutability": "Not" + }, + { + "ty": 26, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 76, + "mutability": "Not" + }, + { + "ty": 26, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 67, "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - } - ] - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 12, - "projection": [ - { - "Field": [ - 0, - 9 - ] } - ] - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 10, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 63 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Move": { - "local": 10, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 63 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 0, - 9 - ] + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 71, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 72, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 73, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 74, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 75, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 76, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 18, + "projection": [] + } + }, + "argument_index": null } - ] - } - } + ], + "spread_arg": null, + "span": 77 } - ] - }, - "span": 63 - }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 65 - }, - { - "kind": { - "Assign": [ - { - "local": 16, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 66 - }, - { - "kind": { - "Assign": [ - { - "local": 17, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 15, - "projection": [] - } - }, - { - "Copy": { - "local": 16, - "projection": [] - } - } - ] - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 17, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Move": { - "local": 15, - "projection": [] - } - }, - { - "Move": { - "local": 16, - "projection": [] - } - } - ] - }, - "target": 7, - "unwind": "Continue" - } - }, - "span": 64 + ] } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 17, - "projection": [ - { - "Field": [ - 0, - 26 - ] + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h2376acb044c61e74E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } } - ] - } - } - } - ] - }, - "span": 64 - }, - { - "kind": { - "Assign": [ - { - "local": 19, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 68 - }, - { - "kind": { - "Assign": [ - { - "local": 20, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 14, - "projection": [] - } - }, - { - "Copy": { - "local": 19, - "projection": [] - } - } - ] - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 20, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 14, - "projection": [] - } - }, - { - "Move": { - "local": 19, - "projection": [] - } - } - ] - }, - "target": 8, - "unwind": "Continue" - } - }, - "span": 67 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 18, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 20, - "projection": [ - { - "Field": [ - 0, - 26 - ] + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" } - ] - } - } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": "Return", - "span": 69 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 71, - "mutability": "Not" - }, - { - "ty": 27, - "span": 52, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 72, - "mutability": "Not" - }, - { - "ty": 27, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 73, - "mutability": "Not" - }, - { - "ty": 2, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 59, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 74, - "mutability": "Not" - }, - { - "ty": 9, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 62, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 75, - "mutability": "Not" - }, - { - "ty": 26, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 76, - "mutability": "Not" - }, - { - "ty": 26, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 67, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 71, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 72, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 73, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 74, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 9, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 75, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 14, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "f", - "source_info": { - "span": 76, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 18, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 77 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h408f33832fba4274E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h2376acb044c61e74E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, { - "Field": [ - 0, - 15 - ] + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 }, { - "Field": [ - 0, - 9 - ] + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null } - ] - } - } + ], + "spread_arg": null, + "span": 13 } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 26, - { - "RigidTy": { - "Int": "I16" + } + }, + "details": null } - } ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } + "types": [ + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 25, + { + "RigidTy": "Bool" + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ] ], - [ - 25, - { - "RigidTy": "Bool" - } - ] - ], - "debug": null -} + "debug": null +} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state index 31fb43dd2..79b22201f 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -33,34 +33,34 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( typedLocal ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) @@ -68,12 +68,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json index 4ac711f72..2d5b11ed1 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json @@ -1,1933 +1,1951 @@ { - "name": "unary", - "crate_id": 16478188162494399089, - "allocs": [], - "functions": [ - [ - 20, - { - "IntrinsicSym": "black_box" - } + "name": "unary", + "crate_id": 16478188162494399089, + "allocs": [], + "functions": [ + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE" + } + ], + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E" + } + ] ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE" - } - ], - [ - 27, - { - "NoOpSym": "" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start17hdc5efb1e0bda457bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, "mutability": "Mut" - } }, - "ty": 17, - "id": 8 - } - } - } + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + ] } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h6102650d02f5b9f6E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h6102650d02f5b9f6E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN5unary4main17hb4d720234eb3817dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN5unary4main17hb4d720234eb3817dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 + } + } + } + ] + } + ] + }, + "span": 52 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 133 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 11 + } + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 12 + } + } + } + ] + } + ] + }, + "span": 58 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 + } + } + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [] + } + }, + "expected": false, + "msg": { + "OverflowNeg": { + "Copy": { + "local": 4, + "projection": [] + } + } + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 53 } - }, - "ty": 9, - "id": 10 - } - } - } - ] - } - ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "UnaryOp": [ + "Neg", + { + "Copy": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 53 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, + "terminator": { + "kind": "Return", + "span": 59 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 60, "mutability": "Mut" - } }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, + { + "ty": 9, + "span": 61, + "mutability": "Not" + }, + { + "ty": 26, + "span": 52, "mutability": "Mut" - } }, - "ty": 9, - "id": 10 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] + { + "ty": 9, + "span": 62, + "mutability": "Not" + }, + { + "ty": 2, + "span": 63, + "mutability": "Not" + }, + { + "ty": 25, + "span": 64, + "mutability": "Not" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 25, + "span": 53, + "mutability": "Mut" } - ] - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 133 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 61, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 62, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 63, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 64, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 65, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null } - } - } - ] + ], + "spread_arg": null, + "span": 66 } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ { - "UnaryOp": [ - "Not", - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - }, - "ty": 25, - "id": 12 - } - } - } - ] - } - ] - }, - "span": 58 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - }, - "ty": 2, - "id": 13 } - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [] - } - }, - "expected": false, - "msg": { - "OverflowNeg": { - "Copy": { - "local": 4, - "projection": [] - } - } - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 53 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "UnaryOp": [ - "Neg", - { - "Copy": { - "local": 4, - "projection": [] - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": "Return", - "span": 59 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 61, - "mutability": "Not" - }, - { - "ty": 26, - "span": 52, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 62, - "mutability": "Not" - }, - { - "ty": 2, - "span": 63, - "mutability": "Not" - }, - { - "ty": 25, - "span": 64, - "mutability": "Not" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 25, - "span": 53, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 61, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 62, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 63, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 64, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 65, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 66 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hdc5efb1e0bda457bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ { - "Downcast": 0 + "ty": 17, + "span": 47, + "mutability": "Mut" }, { - "Field": [ - 0, - 6 - ] + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - ] - } - } + ], + "spread_arg": null, + "span": 49 } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + ] } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ { - "Move": { - "local": 3, - "projection": [] - } + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17ha3656d0fc756ed53E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" }, { - "Field": [ - 0, - 9 - ] + "ty": 22, + "span": 44, + "mutability": "Not" } - ] - } - } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17ha3656d0fc756ed53E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } + }, + "details": null } - }, - "details": null - } - ], - "types": [ - [ - 25, - { - "RigidTy": "Bool" - } ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } + "types": [ + [ + 25, + { + "RigidTy": "Bool" + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ] ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} + "debug": null +} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state index c038a0bfb..b5e026aa5 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state @@ -27,14 +27,14 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) @@ -42,12 +42,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x85" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: false , msg: assertMessageOverflowNeg ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNeg , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 63 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x85" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: false , msg: assertMessageOverflowNeg ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNeg , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 63 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json index 2b5c079a7..a7b2eb531 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json @@ -1,2161 +1 @@ -{ - "name": "assign_cast", - "crate_id": 13002952174156868308, - "allocs": [], - "functions": [ - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0a70c56a5c4492dfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN11assign_cast4main17ha51d0dbb589964c1E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 9 - } - } - } - } - ] - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 2 - ] - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - 27 - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - 2 - ] - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - 2 - ] - } - ] - }, - "span": 58 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - 25 - ] - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - 28 - ] - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - 25 - ] - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - 29 - ] - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - 9 - ] - } - ] - }, - "span": 63 - }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - 9 - ] - } - ] - }, - "span": 64 - }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 28 - ] - } - ] - }, - "span": 65 - } - ], - "terminator": { - "kind": "Return", - "span": 50 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 67, - "mutability": "Not" - }, - { - "ty": 2, - "span": 68, - "mutability": "Not" - }, - { - "ty": 26, - "span": 69, - "mutability": "Not" - }, - { - "ty": 16, - "span": 70, - "mutability": "Not" - }, - { - "ty": 26, - "span": 71, - "mutability": "Not" - }, - { - "ty": 27, - "span": 72, - "mutability": "Not" - }, - { - "ty": 2, - "span": 73, - "mutability": "Not" - }, - { - "ty": 2, - "span": 74, - "mutability": "Not" - }, - { - "ty": 25, - "span": 75, - "mutability": "Not" - }, - { - "ty": 28, - "span": 76, - "mutability": "Not" - }, - { - "ty": 25, - "span": 77, - "mutability": "Not" - }, - { - "ty": 29, - "span": 78, - "mutability": "Not" - }, - { - "ty": 9, - "span": 79, - "mutability": "Not" - }, - { - "ty": 9, - "span": 80, - "mutability": "Not" - }, - { - "ty": 28, - "span": 81, - "mutability": "Not" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 68, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 69, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 70, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 71, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "f", - "source_info": { - "span": 72, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "g", - "source_info": { - "span": 73, - "scope": 7 - }, - "composite": null, - "value": { - "Place": { - "local": 7, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "h", - "source_info": { - "span": 74, - "scope": 8 - }, - "composite": null, - "value": { - "Place": { - "local": 8, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "i", - "source_info": { - "span": 75, - "scope": 9 - }, - "composite": null, - "value": { - "Place": { - "local": 9, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "j", - "source_info": { - "span": 76, - "scope": 10 - }, - "composite": null, - "value": { - "Place": { - "local": 10, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "k", - "source_info": { - "span": 77, - "scope": 11 - }, - "composite": null, - "value": { - "Place": { - "local": 11, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "l", - "source_info": { - "span": 78, - "scope": 12 - }, - "composite": null, - "value": { - "Place": { - "local": 12, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "m", - "source_info": { - "span": 79, - "scope": 13 - }, - "composite": null, - "value": { - "Place": { - "local": 13, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "n", - "source_info": { - "span": 80, - "scope": 14 - }, - "composite": null, - "value": { - "Place": { - "local": 14, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "o", - "source_info": { - "span": 81, - "scope": 15 - }, - "composite": null, - "value": { - "Place": { - "local": 15, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 82 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hb5b25907048cfcaeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h5f5fa8aba711bbb4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 29, - { - "RigidTy": { - "Uint": "U64" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 26, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 28, - { - "RigidTy": { - "Uint": "U32" - } - } - ], - [ - 25, - { - "RigidTy": { - "Uint": "U16" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 27, - { - "RigidTy": { - "Int": "I64" - } - } - ] - ], - "debug": null -} +{"name":"assign_cast2","crate_id":2350940226393625358,"allocs":[],"functions":[[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[33,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h11453166664855b3E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h28b446e5bad970fcE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h7179fe126d65311fE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN12assign_cast24main17h62f0e7a858f55442E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":51,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[128,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":25,"id":9}}}}]},"span":51},{"kind":{"Assign":[{"local":2,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},2]}]},"span":52},{"kind":{"Assign":[{"local":3,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},26]}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},16]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},26]}]},"span":55},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},27]}]},"span":56},{"kind":{"Assign":[{"local":7,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},2]}]},"span":57},{"kind":{"Assign":[{"local":8,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},2]}]},"span":58},{"kind":{"Assign":[{"local":9,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},25]}]},"span":59},{"kind":{"Assign":[{"local":10,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},28]}]},"span":60},{"kind":{"Assign":[{"local":11,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},25]}]},"span":61},{"kind":{"Assign":[{"local":12,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},29]}]},"span":62},{"kind":{"Assign":[{"local":13,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},9]}]},"span":63},{"kind":{"Assign":[{"local":14,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},9]}]},"span":64},{"kind":{"Assign":[{"local":15,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":6,"projection":[]}},28]}]},"span":65}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"},{"ty":25,"span":67,"mutability":"Not"},{"ty":2,"span":68,"mutability":"Not"},{"ty":26,"span":69,"mutability":"Not"},{"ty":16,"span":70,"mutability":"Not"},{"ty":26,"span":71,"mutability":"Not"},{"ty":27,"span":72,"mutability":"Not"},{"ty":2,"span":73,"mutability":"Not"},{"ty":2,"span":74,"mutability":"Not"},{"ty":25,"span":75,"mutability":"Not"},{"ty":28,"span":76,"mutability":"Not"},{"ty":25,"span":77,"mutability":"Not"},{"ty":29,"span":78,"mutability":"Not"},{"ty":9,"span":79,"mutability":"Not"},{"ty":9,"span":80,"mutability":"Not"},{"ty":28,"span":81,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":68,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":69,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"d","source_info":{"span":70,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"e","source_info":{"span":71,"scope":5},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null},{"name":"f","source_info":{"span":72,"scope":6},"composite":null,"value":{"Place":{"local":6,"projection":[]}},"argument_index":null},{"name":"g","source_info":{"span":73,"scope":7},"composite":null,"value":{"Place":{"local":7,"projection":[]}},"argument_index":null},{"name":"h","source_info":{"span":74,"scope":8},"composite":null,"value":{"Place":{"local":8,"projection":[]}},"argument_index":null},{"name":"i","source_info":{"span":75,"scope":9},"composite":null,"value":{"Place":{"local":9,"projection":[]}},"argument_index":null},{"name":"j","source_info":{"span":76,"scope":10},"composite":null,"value":{"Place":{"local":10,"projection":[]}},"argument_index":null},{"name":"k","source_info":{"span":77,"scope":11},"composite":null,"value":{"Place":{"local":11,"projection":[]}},"argument_index":null},{"name":"l","source_info":{"span":78,"scope":12},"composite":null,"value":{"Place":{"local":12,"projection":[]}},"argument_index":null},{"name":"m","source_info":{"span":79,"scope":13},"composite":null,"value":{"Place":{"local":13,"projection":[]}},"argument_index":null},{"name":"n","source_info":{"span":80,"scope":14},"composite":null,"value":{"Place":{"local":14,"projection":[]}},"argument_index":null},{"name":"o","source_info":{"span":81,"scope":15},"composite":null,"value":{"Place":{"local":15,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[25,{"RigidTy":{"Uint":"U16"}}],[26,{"RigidTy":{"Int":"I16"}}],[28,{"RigidTy":{"Uint":"U32"}}],[29,{"RigidTy":{"Uint":"U64"}}],[27,{"RigidTy":{"Int":"I64"}}],[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state index 326e8ac9e..356632fa5 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state @@ -25,34 +25,34 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state index fcae5e94d..d0916639e 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state @@ -25,25 +25,25 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state deleted file mode 100644 index fcae5e94d..000000000 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state +++ /dev/null @@ -1,62 +0,0 @@ - - - #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K - - - noReturn - - - ty ( 27 ) - - - - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) - - - ty ( 25 ) - - - place (... local: local ( 0 ) , projection: .ProjectionElems ) - - - someBasicBlockIdx ( basicBlockIdx ( 1 ) ) - - - unwindActionContinue - - - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) - - - - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - - - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) ) ) - - - .Map - - - symbol ( "main" ) - - - ty ( 2 ) |-> rigidTyInt ( intTyI8 ) - ty ( 6 ) |-> rigidTyInt ( intTyIsize ) - ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) - ty ( 16 ) |-> rigidTyInt ( intTyI32 ) - ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) - ty ( 28 ) |-> rigidTyInt ( intTyI16 ) - - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json index 0e8e20a56..7073dd042 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json @@ -1,1731 +1,1753 @@ { - "name": "main_a_b_with_int", - "crate_id": 9173310213495213748, - "allocs": [], - "functions": [ - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" - } + "name": "main_a_b_with_int", + "crate_id": 9173310213495213748, + "allocs": [], + "functions": [ + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 32, + { + "NoOpSym": "" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" + } + ], + [ + 27, + { + "NormalSym": "_ZN17main_a_b_with_int1b17h92605682282418dbE" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" + } + ], + [ + 25, + { + "NormalSym": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" + } + ] ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" - } - ], - [ - 27, - { - "NormalSym": "_ZN17main_a_b_with_int1b17h92605682282418dbE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" - } - ], - [ - 29, - { - "NoOpSym": "" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" - } - ], - [ - 25, - { - "NormalSym": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN17main_a_b_with_int4main17h37f7f24b825d5c5dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 10 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 53 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 54, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 55 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ { - "Move": { - "local": 2, - "projection": [] - } + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + ] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN17main_a_b_with_int4main17h37f7f24b825d5c5dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int1b17h92605682282418dbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "b", + "id": 8, + "body": [ { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 65, + "mutability": "Not" + }, + { + "ty": 28, + "span": 66, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "_s", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "_t", + "source_info": { + "span": 66, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 } - }, - "ty": 26, - "id": 10 - } - } + ], + "spread_arg": null, + "span": 67 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 53 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 54, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 55 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h343aa02f84d02209E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E", - "mono_item_kind": { - "MonoItemFn": { - "name": "a", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 11 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hfb4d01dc98c21e58E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 11, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } } - }, - "ty": 28, - "id": 12 - } - } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 58 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 59 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "s", - "source_info": { - "span": 61, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 62 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h96705bf254340eb7E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h96705bf254340eb7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ { - "Move": { - "local": 2, - "projection": [] - } + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN17main_a_b_with_int1b17h92605682282418dbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "b", - "id": 8, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 65, - "mutability": "Not" - }, - { - "ty": 28, - "span": 66, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "_s", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "_t", - "source_info": { - "span": 66, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 67 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } ], - "provenance": { - "ptrs": [] - }, - "align": 1, + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, "mutability": "Mut" - } }, - "ty": 17, - "id": 8 - } - } - } + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + ] } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hfb4d01dc98c21e58E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ { - "Use": { - "Copy": { - "local": 5, - "projection": [ + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, { - "Downcast": 0 + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } }, { - "Field": [ - 0, - 6 - ] + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E", + "mono_item_kind": { + "MonoItemFn": { + "name": "a", + "id": 7, + "body": [ { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 11 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 11, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 12 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 58 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 59 + } } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } + ], + "locals": [ + { + "ty": 1, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 61, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 62 } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h343aa02f84d02209E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ { - "Move": { - "local": 3, - "projection": [] - } + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" }, { - "Field": [ - 0, - 9 - ] + "ty": 1, + "span": 48, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - } - ], - "types": [ - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 28, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" + } + }, + "details": null } - } ], - [ - 26, - { - "RigidTy": { - "Uint": "Usize" - } - } + "types": [ + [ + 28, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 26, + { + "RigidTy": { + "Uint": "Usize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ] - ], - "debug": null -} + "debug": null +} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state index 0fc3fa20d..a1f32b1d1 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state @@ -25,24 +25,24 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state index df42932d5..17446d8ca 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state @@ -26,22 +26,22 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json index ebdb4e0d4..9d40edd0d 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json @@ -1,1659 +1 @@ -{ - "name": "main_a_b_c", - "crate_id": 2129868149476588123, - "allocs": [], - "functions": [ - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE" - } - ], - [ - 25, - { - "NormalSym": "_ZN10main_a_b_c1a17hf96e7944faad0bd0E" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E" - } - ], - [ - 31, - { - "NoOpSym": "" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 27, - { - "NormalSym": "_ZN10main_a_b_c1c17h59101d2318335bbdE" - } - ], - [ - 26, - { - "NormalSym": "_ZN10main_a_b_c1b17hbedf65f2538ce3adE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN10main_a_b_c1c17h59101d2318335bbdE", - "mono_item_kind": { - "MonoItemFn": { - "name": "c", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 66, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 67 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN10main_a_b_c4main17hcaca459da1b06b9fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 52 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 53, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 54 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17he509fe31442a28c4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN10main_a_b_c1a17hf96e7944faad0bd0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "a", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 10 - } - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 56 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 57 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 58, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 59 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN10main_a_b_c1b17hbedf65f2538ce3adE", - "mono_item_kind": { - "MonoItemFn": { - "name": "b", - "id": 8, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 11 - } - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 63, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ] - ], - "debug": null -} +{"name":"main_a_b_c","crate_id":2129868149476588123,"allocs":[],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E"}],[20,{"IntrinsicSym":"black_box"}],[27,{"NormalSym":"_ZN10main_a_b_c1c17h59101d2318335bbdE"}],[25,{"NormalSym":"_ZN10main_a_b_c1a17hf96e7944faad0bd0E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[26,{"NormalSym":"_ZN10main_a_b_c1b17hbedf65f2538ce3adE"}],[31,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start17he509fe31442a28c4E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1b17hbedf65f2538ce3adE","mono_item_kind":{"MonoItemFn":{"name":"b","id":8,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":27,"id":11}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":61}},{"statements":[],"terminator":{"kind":"Return","span":62}}],"locals":[{"ty":1,"span":63,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":64}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c4main17hcaca459da1b06b9fE","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":51}},{"statements":[],"terminator":{"kind":"Return","span":52}}],"locals":[{"ty":1,"span":53,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":54}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1a17hf96e7944faad0bd0E","mono_item_kind":{"MonoItemFn":{"name":"a","id":7,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":55,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":10}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":56}},{"statements":[],"terminator":{"kind":"Return","span":57}}],"locals":[{"ty":1,"span":58,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":59}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1c17h59101d2318335bbdE","mono_item_kind":{"MonoItemFn":{"name":"c","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":67}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json index 804577cd2..0b911681f 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json @@ -85,27 +85,27 @@ ], "functions": [ [ - 0, + 31, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E" } ], [ - 13, + 0, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 14, + 13, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E" } ], [ - 20, + 23, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE" } ], [ @@ -115,2513 +115,2537 @@ } ], [ - 19, + 26, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E" + "NormalSym": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E" } ], [ - 31, + 35, { - "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E" + "NoOpSym": "" } ], [ - 37, + 14, { - "NoOpSym": "" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E" } ], [ - 26, + 19, { - "NormalSym": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E" } ], [ - 23, + 20, { - "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE" + "IntrinsicSym": "black_box" } ], [ - 29, + 27, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E" } ], [ - 27, + 29, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E", + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE", "mono_item_kind": { "MonoItemFn": { - "name": "std::cmp::impls::::eq", + "name": "std::cmp::impls::::eq", "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } } } - } - ] + ] + }, + "span": 54 }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } } } - } - ] - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 6 - } - } + ] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] + "span": 55 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 7 + } } }, - { - "Move": { - "local": 4, - "projection": [] + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 53 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 - } - } - ], - "locals": [ - { - "ty": 21, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 58, - "mutability": "Not" - }, - { - "ty": 24, - "span": 59, - "mutability": "Not" - }, - { - "ty": 25, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 59, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 58, - "scope": 0 + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 + } }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 58, + "mutability": "Not" }, - "argument_index": 1 - }, - { - "name": "other", - "source_info": { + { + "ty": 25, "span": 59, - "scope": 0 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 22, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 58, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 60 - } + { + "name": "other", + "source_info": { + "span": 59, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 60 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - } - ], - "destination": { - "local": 3, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 61 } - }, - "span": 15 - } - }, - { - "statements": [ - { + ], + "terminator": { "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 9 + } } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + } }, - "span": 22 - }, - { + "span": 61 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 5, + "Drop": { + "place": { + "local": 1, "projection": [] }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] + "target": 2, + "unwind": "Continue" + } }, - "span": 22 - }, - { + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + }, + { + "statements": [], + "terminator": { "kind": { - "StorageLive": 6 + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + }, + { + "ty": 30, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 10 } - ] + } } } - } - ] - }, - "span": 23 + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 66, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 66, + "scope": 0 }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 67 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::eq", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 44 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] } - }, - 16 - ] - } - ] + } + } + ] + }, + "span": 44 }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 + { + "kind": { + "StorageLive": 4 + }, + "span": 45 }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 45 }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 46 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 47 }, - "span": 27 + { + "kind": { + "StorageDead": 3 + }, + "span": 47 + } + ], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 20 } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } + ], + "locals": [ + { + "ty": 21, + "span": 48, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 22, + "span": 49, + "mutability": "Not" }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "ty": 22, + "span": 50, + "mutability": "Not" + }, + { + "ty": 2, + "span": 44, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } + { + "ty": 2, + "span": 45, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 49, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 50, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 51 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17h00fbe264978df755E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 + { + "kind": { + "StorageLive": 3 + }, + "span": 15 }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 + { + "kind": { + "StorageLive": 4 + }, + "span": 17 }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", { - "Type": 4 + "Field": [ + 0, + 7 + ] } ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } } - ] - ] - } - ] - }, - "span": 3 - }, - { + } + } + ] + }, + "span": 17 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 7, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, + "args": [ + { + "Move": { + "local": 4, "projection": [] } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + } + ], + "destination": { + "local": 3, "projection": [] }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] + "target": 1, + "unwind": "Continue" + } }, - "span": 2 + "span": 15 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } } }, - { - "Move": { - "local": 2, - "projection": [] + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } } + ], + "destination": { + "local": 2, + "projection": [] }, - { - "Move": { - "local": 3, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] } - }, - { - "Move": { - "local": 4, + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } } - } - ], - "destination": { - "local": 5, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + "span": 23 }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] } - ] - } + }, + 16 + ] } - } - ] + ] + }, + "span": 24 }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 + { + "kind": { + "StorageDead": 6 + }, + "span": 25 }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "StorageDead": 5 + }, + "span": 26 }, - "span": 7 + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "terminator": { - "kind": "Return", - "span": 4 } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 + { + "ty": 11, + "span": 3, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 17, + "span": 16, + "mutability": "Mut" }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 + { + "ty": 1, + "span": 15, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } + { + "ty": 7, + "span": 17, + "mutability": "Mut" }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 + { + "ty": 18, + "span": 22, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E", + "symbol_name": "_ZN9doubleRef4main17h95ea92da4b4a3e96E", "mono_item_kind": { "MonoItemFn": { - "name": "std::cmp::impls::::eq", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 44 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] + "name": "main", + "id": 8, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 11 + } + } } } - } - ] + ] + }, + "span": 69 }, - "span": 44 - }, - { - "kind": { - "StorageLive": 4 + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 70 }, - "span": 45 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [] + } + ] + } + ] + }, + "span": 71 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CopyForDeref": { + "local": 3, "projection": [ "Deref" ] } } - } - ] + ] + }, + "span": 72 }, - "span": 45 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 13, + "projection": [ + "Deref" + ] } } - ] - } - ] - }, - "span": 46 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 47 - }, - { - "kind": { - "StorageDead": 3 + } + ] + }, + "span": 72 }, - "span": 47 - } - ], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 21, - "span": 48, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 49, - "mutability": "Not" - }, - { - "ty": 22, - "span": 50, - "mutability": "Not" - }, - { - "ty": 2, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 45, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 49, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "other", - "source_info": { - "span": 50, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 51 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 29, - "id": 9 + ] } - } + ] }, - "args": [ - { + "span": 68 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { "Move": { - "local": 3, + "local": 4, "projection": [] } }, - { - "Move": { - "local": 2, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 68 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 3, + "projection": [] + } + ] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + ] }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 61 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - }, - { - "ty": 30, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h484e2183c4c007e2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 8 + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] } - } + ] }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 11, + "projection": [] + } ] } - }, - { - "Move": { - "local": 2, + ] + }, + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 9, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 10, + "projection": [] + } + ] } - } - ], - "destination": { - "local": 0, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 76 } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::cmp::impls::::eq", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 12 + } + } }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] + "args": [ + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Move": { + "local": 9, + "projection": [] } } - } - ] + ], + "destination": { + "local": 7, + "projection": [] + }, + "target": 3, + "unwind": "Continue" + } }, - "span": 54 - }, - { + "span": 73 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 4, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 77, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 33, + "id": 14 + } } } - } - ] + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } }, - "span": 55 + "span": 77 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 7 - } - } - }, - "args": [ - { + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { "Move": { - "local": 3, + "local": 7, "projection": [] } }, - { - "Move": { - "local": 4, - "projection": [] - } + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 53 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 - } - } - ], - "locals": [ - { - "ty": 21, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 58, - "mutability": "Not" - }, - { - "ty": 25, - "span": 59, - "mutability": "Not" - }, - { - "ty": 22, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 59, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 58, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + } + }, + "span": 73 } }, - "argument_index": 1 - }, - { - "name": "other", - "source_info": { - "span": 59, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 } }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 60 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } }, - { - "Use": { + "args": [ + { "Constant": { - "span": 64, + "span": 32, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, 0 ], "provenance": { - "ptrs": [] + "ptrs": [ + [ + 0, + 1 + ] + ] }, - "align": 1, + "align": 8, "mutability": "Mut" } }, - "ty": 17, - "id": 10 + "ty": 33, + "id": 15 } } } - } - ] + ], + "destination": { + "local": 12, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } }, - "span": 64 + "span": 79 } - ], - "terminator": { - "kind": "Return", - "span": 63 } - } - ], - "locals": [ - { - "ty": 17, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 66, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 66, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + ], + "locals": [ + { + "ty": 1, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 81, + "mutability": "Not" + }, + { + "ty": 22, + "span": 82, + "mutability": "Not" + }, + { + "ty": 25, + "span": 83, + "mutability": "Not" + }, + { + "ty": 21, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 34, + "span": 77, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 76, + "mutability": "Not" + }, + { + "ty": 22, + "span": 75, + "mutability": "Not" + }, + { + "ty": 34, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 83, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 81, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 82, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 83, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h7861fc27b244f735E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 } + } + ], + "locals": [ + { + "ty": 1, + "span": 62, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 67 - } + { + "ty": 28, + "span": 62, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 62 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E", + "symbol_name": "_ZN3std2rt10lang_start17h00fbe264978df755E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] } - } + ] }, - "args": [ - { - "Move": { - "local": 1, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] } - }, - { + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 0, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 1, - "id": 4 + "ty": 0, + "id": 0 } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } - } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } } } - } - ], - "destination": { - "local": 2, - "projection": [] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - "target": 2, - "unwind": "Unreachable" + "span": 7 } - }, - "span": 35 + ], + "terminator": { + "kind": "Return", + "span": 4 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] } - } + }, + "argument_index": 4 }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] } }, "details": null }, { - "symbol_name": "_ZN9doubleRef4main17h95ea92da4b4a3e96E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 1, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } }, - { - "Use": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { "Constant": { - "span": 69, + "span": 32, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } } - } - ] - }, - "span": 69 - }, - { - "kind": { - "Assign": [ - { - "local": 2, + ], + "destination": { + "local": 0, "projection": [] }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] - } - ] + "target": 1, + "unwind": "Continue" + } }, - "span": 70 - }, - { + "span": 33 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ] - } - ] - }, - "span": 71 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CopyForDeref": { - "local": 3, - "projection": [ - "Deref" - ] } - } - ] - }, - "span": 72 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] }, - { - "Use": { - "Copy": { - "local": 13, - "projection": [ - "Deref" - ] + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } } - } - ] - }, - "span": 72 - }, - { - "kind": { - "Assign": [ - { - "local": 4, + ], + "destination": { + "local": 2, "projection": [] }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 68 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } }, - "span": 68 + "argument_index": 1 } - }, - { - "statements": [ - { + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h484e2183c4c007e2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 8 } - ] - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "args": [ + { + "Move": { "local": 1, - "projection": [] + "projection": [ + "Deref" + ] } - ] - } - ] - }, - "span": 75 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 11, + }, + { + "Move": { + "local": 2, "projection": [] } - ] - } - ] - }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 9, + } + ], + "destination": { + "local": 0, "projection": [] }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 10, - "projection": [] - } - ] - } - ] + "target": 1, + "unwind": "Continue" + } }, - "span": 76 + "span": 61 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 73, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 12 - } - } - }, - "args": [ - { + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Move": { - "local": 8, + "local": 1, "projection": [] } }, - { - "Move": { - "local": 9, - "projection": [] - } - } - ], - "destination": { - "local": 7, - "projection": [] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 73 + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 77, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::eq", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } } - } + ] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 33, - "id": 14 + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } } } - } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } + ] }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 4 - } + "span": 55 } - }, - "span": 73 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } - }, - "args": [ - { + ], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 52, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 33, - "id": 15 + "kind": "ZeroSized", + "ty": 23, + "id": 6 } } - } - ], - "destination": { - "local": 12, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 79 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 81, - "mutability": "Not" - }, - { - "ty": 22, - "span": 82, - "mutability": "Not" - }, - { - "ty": 25, - "span": 83, - "mutability": "Not" - }, - { - "ty": 21, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 34, - "span": 77, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 76, - "mutability": "Not" - }, - { - "ty": 22, - "span": 75, - "mutability": "Not" - }, - { - "ty": 34, - "span": 79, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 83, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 81, - "scope": 1 + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 + } }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "y", - "source_info": { - "span": 82, - "scope": 2 + { + "ty": 24, + "span": 58, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 24, + "span": 59, + "mutability": "Not" }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 83, - "scope": 3 + { + "ty": 25, + "span": 58, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } + { + "ty": 25, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 58, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 84 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h7861fc27b244f735E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 + { + "name": "other", + "source_info": { + "span": 59, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 } - } - ], - "locals": [ - { - "ty": 1, - "span": 62, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 62, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 62 - } + ], + "spread_arg": null, + "span": 60 + } + ] } }, "details": null @@ -2629,16 +2653,18 @@ ], "types": [ [ - 21, + 9, { - "RigidTy": "Bool" + "RigidTy": { + "Uint": "U8" + } } ], [ - 2, + 6, { "RigidTy": { - "Int": "I8" + "Int": "Isize" } } ], @@ -2651,18 +2677,16 @@ } ], [ - 9, + 21, { - "RigidTy": { - "Uint": "U8" - } + "RigidTy": "Bool" } ], [ - 6, + 2, { "RigidTy": { - "Int": "Isize" + "Int": "I8" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state index ad32c52d7..473de3a2a 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -30,35 +30,35 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) ) ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) ) ) - ty ( 29 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) .Bodies ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) + ty ( 29 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json index 472f5fc06..c0bd3bf34 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json @@ -3,7 +3,7 @@ "crate_id": 4352655527695101489, "allocs": [ [ - 3, + 2, { "Memory": { "bytes": [ @@ -30,7 +30,7 @@ 61, 61, 32, - 50, + 51, 50 ], "provenance": { @@ -42,7 +42,7 @@ } ], [ - 2, + 3, { "Memory": { "bytes": [ @@ -69,7 +69,7 @@ 61, 61, 32, - 51, + 50, 50 ], "provenance": { @@ -88,12 +88,6 @@ "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E" - } - ], [ 26, { @@ -101,15 +95,15 @@ } ], [ - 21, + 19, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E" } ], [ - 19, + 13, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E" } ], [ @@ -118,6 +112,12 @@ "NoOpSym": "" } ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E" + } + ], [ 20, { @@ -125,9 +125,9 @@ } ], [ - 23, + 21, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE" } ], [ @@ -146,447 +146,275 @@ "uneval_consts": [], "items": [ { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E", + "symbol_name": "_ZN10mutableRef1f17h63ad688e5733c791E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 15 } - ] + } } } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 70 } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 + ], + "terminator": { + "kind": "Return", + "span": 68 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 + ], + "locals": [ + { + "ty": 1, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 72, + "scope": 0 }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] + } }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { + ], + "destination": { "local": 0, "projection": [] }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + "target": 1, + "unwind": "Continue" + } }, - "span": 27 + "span": 33 } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" } - ] + }, + "span": 35 } }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + { + "ty": 7, + "span": 38, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h8964be79673df687E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 42 + } + ] } }, "details": null @@ -597,1317 +425,1372 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 + { + "kind": { + "StorageLive": 6 + }, + "span": 2 }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 + { + "kind": { + "StorageLive": 8 + }, + "span": 3 }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ { - "Copy": { - "local": 1, - "projection": [] + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] + } + ] + }, + "span": 3 }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 + ] } - } + ] }, - "args": [ - { - "Move": { + "span": 2 + }, + { + "kind": { + "Assign": [ + { "local": 6, "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] } - }, - { - "Move": { - "local": 2, - "projection": [] + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } } }, - { - "Move": { - "local": 3, - "projection": [] + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 5, + "projection": [] }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + "span": 5 }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } } } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 + ] + }, + "span": 6 }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "StorageDead": 8 + }, + "span": 7 }, - "span": 7 + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "terminator": { - "kind": "Return", - "span": 4 } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "ty": 7, + "span": 9, + "mutability": "Not" }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { + { + "ty": 6, "span": 10, - "scope": 0 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { + { + "ty": 8, "span": 11, - "scope": 0 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { + { + "ty": 9, "span": 12, - "scope": 0 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + { + "ty": 10, + "span": 1, + "mutability": "Mut" }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 + { + "ty": 5, + "span": 2, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E", + "symbol_name": "_ZN10mutableRef4main17h93ec5d833ede8e5dE", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 32, + 2 + ] + ], + "otherwise": 3 } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 22 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 11 + } + } + } + } + ] }, - "args": [], - "destination": { - "local": 0, - "projection": [] + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] }, - "target": 1, - "unwind": "Continue" + "span": 60 } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, - "projection": [] + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } }, - { - "Use": { + "targets": { + "branches": [ + [ + 22, + 4 + ] + ], + "otherwise": 5 + } + } + }, + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } + }, + "args": [ + { "Constant": { - "span": 46, + "span": 32, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, 0 ], "provenance": { - "ptrs": [] + "ptrs": [ + [ + 0, + 0 + ] + ] }, - "align": 1, + "align": 8, "mutability": "Mut" } }, - "ty": 17, - "id": 8 + "ty": 27, + "id": 13 } } } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN10mutableRef1f17h63ad688e5733c791E", - "mono_item_kind": { - "MonoItemFn": { - "name": "f", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 1, - "projection": [ - "Deref" - ] + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } }, - { - "Use": { + "args": [ + { "Constant": { - "span": 69, + "span": 32, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 32 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 ], "provenance": { - "ptrs": [] + "ptrs": [ + [ + 0, + 1 + ] + ] }, - "align": 1, + "align": 8, "mutability": "Mut" } }, - "ty": 2, - "id": 15 + "ty": 27, + "id": 14 } } } - } - ] + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } }, - "span": 70 + "span": 63 } - ], - "terminator": { - "kind": "Return", - "span": 68 } - } - ], - "locals": [ - { - "ty": 1, - "span": 71, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "y", - "source_info": { - "span": 72, - "scope": 0 + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "ty": 2, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 66, + "mutability": "Not" + }, + { + "ty": 2, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 63, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 73 - } + { + "name": "xref", + "source_info": { + "span": 66, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 67 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Move": { "local": 1, "projection": [] } }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + { + "ty": 7, + "span": 43, + "mutability": "Not" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hca02380bc74841bfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + { + "ty": 1, + "span": 43, + "mutability": "Not" } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN10mutableRef4main17h93ec5d833ede8e5dE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - }, - "ty": 2, - "id": 10 + ] } } } - } - ] - }, - "span": 52 - }, - { + ] + }, + "span": 17 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, + "args": [ + { + "Move": { + "local": 4, "projection": [] } - ] - } - ] + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 53 + "span": 15 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - "target": 1, - "unwind": "Continue" + "span": 19 } - }, - "span": 51 - } - }, - { - "statements": [ - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 4, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } }, - { - "Use": { - "Copy": { - "local": 1, + "args": [ + { + "Move": { + "local": 3, "projection": [] } } - } - ] - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 32, - 2 - ] ], - "otherwise": 3 - } - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, + "destination": { + "local": 2, "projection": [] }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] + ] + } + ] + }, + "span": 22 }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 22 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] } - }, - "ty": 2, - "id": 11 + ] } } } - } - ] + ] + }, + "span": 23 }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] } - } - ] + ] + }, + "span": 24 }, - "span": 60 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } + { + "kind": { + "StorageDead": 6 }, - "targets": { - "branches": [ - [ - 22, - 4 - ] - ], - "otherwise": 5 - } + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } - }, - "span": 56 + ], + "terminator": { + "kind": "Return", + "span": 20 + } } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 12 - } - } - }, - "args": [ + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 25, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 13 - } - } + "Field": [ + 0, + 7 + ] } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" + ] } }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 12 - } - } - }, - "args": [ - { + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h8964be79673df687E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 43, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 25, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 14 + "kind": "ZeroSized", + "ty": 21, + "id": 6 } } - } - ], - "destination": { - "local": 8, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 51, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 55, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 66, - "mutability": "Not" - }, - { - "ty": 2, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 63, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 65, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } }, - "argument_index": null - }, - { - "name": "xref", - "source_info": { - "span": 66, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 67 - } + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null @@ -1918,153 +1801,290 @@ "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, + "args": [ + { + "Move": { + "local": 3, "projection": [] } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 } - ] + } }, "span": 43 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 + "target": 2, + "unwind": "Continue" } - } - }, - "span": 43 + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] }, - "target": 2, - "unwind": "Continue" + "span": 46 } - }, - "span": 43 + ], + "terminator": { + "kind": "Return", + "span": 45 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - "span": 43 + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hca02380bc74841bfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] } }, "details": null @@ -2080,26 +2100,26 @@ } ], [ - 9, + 6, { "RigidTy": { - "Uint": "U8" + "Int": "Isize" } } ], [ - 6, + 16, { "RigidTy": { - "Int": "Isize" + "Int": "I32" } } ], [ - 16, + 9, { "RigidTy": { - "Int": "I32" + "Uint": "U8" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state index 0ad6465cc..62b92a680 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -30,28 +30,28 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityMut ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) .Map @@ -65,4 +65,5 @@ ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) ty ( 16 ) |-> rigidTyInt ( intTyI32 ) - \ No newline at end of file + + diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json index 25e36621b..917211b8f 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json @@ -43,516 +43,223 @@ ], "functions": [ [ - 25, + 23, { - "NormalSym": "_ZN8refAsArg1f17h5a492bff7ee056a4E" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E" } ], [ - 20, + 31, { - "IntrinsicSym": "black_box" + "NoOpSym": "" } ], [ - 0, + 26, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 19, + 20, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE" + "IntrinsicSym": "black_box" } ], [ - 23, + 13, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E" } ], [ - 13, + 19, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE" } ], [ - 34, + 25, { - "NoOpSym": "" + "NormalSym": "_ZN8refAsArg1f17h5a492bff7ee056a4E" } ], [ - 21, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 14, + 21, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E" } ], [ - 26, + 14, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN3std2rt10lang_start17hb0648255f9b804cbE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ { - "Copy": { - "local": 1, - "projection": [] + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } + }, + { + "local": 1, + "projection": [] } ] - ] - } - ] - }, - "span": 3 - }, - { + } + ] + }, + "span": 43 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 7, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, + "args": [ + { + "Move": { + "local": 3, "projection": [] } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, "projection": [] }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] + "target": 1, + "unwind": { + "Cleanup": 3 } - ] + } }, - "span": 2 + "span": 43 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, + "Drop": { + "place": { + "local": 1, "projection": [] }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + "target": 2, + "unwind": "Continue" + } }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] + "span": 43 } }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, + "Drop": { + "place": { + "local": 1, "projection": [] }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] + "target": 4, + "unwind": "Terminate" + } }, - "span": 46 + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null @@ -563,303 +270,305 @@ "MonoItemFn": { "name": "main", "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } } } } - } - ] + ] + }, + "span": 52 }, - "span": 52 - }, - { + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, + "args": [ + { + "Copy": { + "local": 3, "projection": [] } - ] - } - ] + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 53 + "span": 51 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] } - } - ], - "destination": { - "local": 2, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 54 } - }, - "span": 51 - } - }, - { - "statements": [ - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 4, - "projection": [] + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 } - ] + } }, "span": 54 } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 55 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 - } - } - }, - "args": [ - { + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 56, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 12 + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } } } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 56 + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 56 + } } - } - ], - "locals": [ - { - "ty": 1, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 58, - "mutability": "Not" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Not" - }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 58, - "scope": 1 + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "ty": 2, + "span": 58, + "mutability": "Not" }, - "argument_index": null - }, - { - "name": "z", - "source_info": { + { + "ty": 2, "span": 59, - "scope": 2 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 60 - } + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } + ] } }, "details": null @@ -870,955 +579,1266 @@ "MonoItemFn": { "name": ">::call_once", "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN8refAsArg1f17h5a492bff7ee056a4E", + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h466a9b165e00f7ddE", "mono_item_kind": { "MonoItemFn": { - "name": "f", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 62 + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "terminator": { - "kind": "Return", - "span": 61 } - } - ], - "locals": [ - { - "ty": 2, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "y", - "source_info": { - "span": 64, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 65 - } + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 } - ] + } } } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - "span": 15 + "argument_index": 1 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } + ], + "spread_arg": null, + "span": 49 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hb0648255f9b804cbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 + "span": 2 }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + { + "kind": { + "StorageLive": 8 + }, + "span": 3 }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } ] - } - ] - } - ] + ] + } + ] + }, + "span": 3 }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 }, - "span": 23 - }, - { + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 6, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - { - "Use": { - "Copy": { + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + ], + "destination": { + "local": 5, "projection": [] }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] + "target": 1, + "unwind": "Continue" + } }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + { + "kind": { + "StorageDead": 8 + }, + "span": 7 }, - "span": 27 + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "terminator": { - "kind": "Return", - "span": 20 } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, "span": 9, - "scope": 0 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } + { + "ty": 6, + "span": 10, + "mutability": "Not" }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 + { + "ty": 8, + "span": 11, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + { + "ty": 11, + "span": 2, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN8refAsArg1f17h5a492bff7ee056a4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 62 + } + ], + "terminator": { + "kind": "Return", + "span": 61 } + } + ], + "locals": [ + { + "ty": 2, + "span": 63, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } + { + "ty": 28, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 64, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 65 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h466a9b165e00f7ddE", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } + ], + "spread_arg": null, + "span": 42 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb11b6a9b578c8caaE", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 43, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 1, - "id": 4 + "ty": 21, + "id": 6 } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] } } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + { + "ty": 22, + "span": 43, + "mutability": "Not" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { "kind": { - "Assign": [ - { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { "local": 3, "projection": [] }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, "projection": [] } - ] - } - ] + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } }, - "span": 43 + "span": 16 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] } - } + ] }, - "args": [ - { - "Move": { - "local": 3, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } } - }, - { - "Move": { - "local": 2, + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] } - } - ], - "destination": { - "local": 0, - "projection": [] + ] }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + "span": 24 + }, + { + "kind": { + "StorageDead": 6 }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 }, - "target": 4, - "unwind": "Terminate" + "span": 27 } - }, - "span": 43 + ], + "terminator": { + "kind": "Return", + "span": 20 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb11b6a9b578c8caaE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", { - "Move": { - "local": 2, - "projection": [] - } + "Field": [ + 0, + 7 + ] } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" + ] } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 3 + } + ] } }, "details": null @@ -1826,41 +1846,41 @@ ], "types": [ [ - 6, + 2, { "RigidTy": { - "Int": "Isize" + "Int": "I8" } } ], [ - 16, + 29, { - "RigidTy": { - "Int": "I32" - } + "RigidTy": "Bool" } ], [ - 9, + 16, { "RigidTy": { - "Uint": "U8" + "Int": "I32" } } ], [ - 2, + 6, { "RigidTy": { - "Int": "I8" + "Int": "Isize" } } ], [ - 29, + 9, { - "RigidTy": "Bool" + "RigidTy": { + "Uint": "U8" + } } ] ], diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state index d1a910bb1..298d04c3e 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -28,25 +28,25 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json index d9dfaae97..b1465fb81 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json @@ -43,51 +43,51 @@ ], "functions": [ [ - 20, + 14, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E" } ], [ - 32, + 21, { - "NoOpSym": "" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE" } ], [ - 26, + 32, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NoOpSym": "" } ], [ - 21, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 23, + 25, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E" + "NormalSym": "_ZN9refAsArg21f17h3824ba4b7ccb016dE" } ], [ - 25, + 23, { - "NormalSym": "_ZN9refAsArg21f17h3824ba4b7ccb016dE" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E" } ], [ - 14, + 20, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E" + "IntrinsicSym": "black_box" } ], [ - 19, + 26, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ @@ -103,1421 +103,1478 @@ } ], [ - 0, + 19, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hd928bd1477e89e88E", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] } } - } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 46 + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E", + "symbol_name": "_ZN9refAsArg21g17h9b15e23b800227b9E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] + "name": "g", + "id": 8, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] }, - "target": 1, - "unwind": "Continue" + "span": 68 } - }, - "span": 43 + ], + "terminator": { + "kind": "Return", + "span": 67 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 2, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 70, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 71 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hd928bd1477e89e88E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE", "mono_item_kind": { "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - } - ], - "destination": { - "local": 0, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 43 } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { + ], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 43, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 1, - "id": 4 + "ty": 23, + "id": 7 } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] } } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + } + }, + "span": 43 } }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E", + "symbol_name": "_ZN9refAsArg24main17hb3acdb099b5ffc5aE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 } - ] + } } } - } - ] + ] + }, + "span": 52 }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] } - } - ], - "destination": { - "local": 3, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 53 } - }, - "span": 15 - } - }, - { - "statements": [ - { + ], + "terminator": { "kind": { - "StorageDead": 4 + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 19 + "span": 51 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] } - } - ], - "destination": { - "local": 2, - "projection": [] + ] }, - "target": 2, - "unwind": "Continue" + "span": 54 } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 5, - "projection": [] + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + } }, - "span": 23 - }, - { + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 6, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } }, - { - "Field": [ - 0, - 9 - ] - } - ] + "ty": 27, + "id": 12 + } } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + ], + "destination": { + "local": 5, "projection": [] }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + "target": null, + "unwind": "Continue" + } }, - "span": 27 + "span": 56 } - ], - "terminator": { - "kind": "Return", - "span": 20 } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } + { + "ty": 2, + "span": 58, + "mutability": "Not" }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 + { + "ty": 2, + "span": 59, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 28, + "span": 53, + "mutability": "Not" }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + { + "ty": 29, + "span": 54, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } + ] } }, "details": null }, { - "symbol_name": "_ZN9refAsArg21g17h9b15e23b800227b9E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E", "mono_item_kind": { "MonoItemFn": { - "name": "g", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { "local": 0, "projection": [] }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } - } - ] + "target": 1, + "unwind": "Continue" + } }, - "span": 68 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 67 } - } - ], - "locals": [ - { - "ty": 2, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 70, - "scope": 0 + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h3f415fb1ec534b7eE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 71 - } + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { + "args": [ + { + "Move": { "local": 1, "projection": [] } - ] - } - ] + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 43 + "span": 33 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } } }, - { - "Move": { - "local": 2, - "projection": [] + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "argument_index": 1 } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 42 + } + ] } }, "details": null }, { - "symbol_name": "_ZN9refAsArg21f17h3824ba4b7ccb016dE", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E", "mono_item_kind": { "MonoItemFn": { - "name": "f", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 13 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } } - } - ], - "destination": { - "local": 0, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 46 } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 2, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 65, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + ], + "terminator": { + "kind": "Return", + "span": 45 } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 66 - } + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] } }, "details": null }, { - "symbol_name": "_ZN9refAsArg24main17hb3acdb099b5ffc5aE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - }, - "ty": 2, - "id": 10 + ] } } } - } - ] - }, - "span": 52 - }, - { + ] + }, + "span": 17 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, + "args": [ + { + "Move": { + "local": 4, "projection": [] } - ] - } - ] + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 53 + "span": 15 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - "target": 1, - "unwind": "Continue" + "span": 19 } - }, - "span": 51 - } - }, - { - "statements": [ - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 4, + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, "projection": [] }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { "local": 2, - "projection": [] + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - }, - { + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { "Copy": { - "local": 1, - "projection": [] + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] } } - ] - } - ] + } + ] + }, + "span": 23 }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 }, - "targets": { - "branches": [ - [ + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ 0, - 3 + 7 ] - ], - "otherwise": 2 - } + } + ] } }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 55 + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 - } - } - }, - "args": [ - { + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN9refAsArg21f17h3824ba4b7ccb016dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 61, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 12 + "kind": "ZeroSized", + "ty": 31, + "id": 13 } } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 56 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 58, - "mutability": "Not" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Not" - }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 58, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 62 } }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 } + } + ], + "locals": [ + { + "ty": 2, + "span": 64, + "mutability": "Mut" }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 60 - } + { + "ty": 28, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 66 + } + ] } }, "details": null @@ -1528,391 +1585,356 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 + { + "kind": { + "StorageLive": 6 + }, + "span": 2 }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 + { + "kind": { + "StorageLive": 8 + }, + "span": 3 }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ { - "Copy": { - "local": 1, - "projection": [] + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] + } + ] + }, + "span": 3 }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 + ] } - } + ] }, - "args": [ - { - "Move": { + "span": 2 + }, + { + "kind": { + "Assign": [ + { "local": 6, "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] } - }, - { - "Move": { - "local": 2, - "projection": [] + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } } }, - { - "Move": { - "local": 3, - "projection": [] + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 5, + "projection": [] }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + "span": 5 }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } } } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 + ] + }, + "span": 6 }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "StorageDead": 8 + }, + "span": 7 }, - "span": 7 + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "terminator": { - "kind": "Return", - "span": 4 } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "ty": 7, + "span": 9, + "mutability": "Not" }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { + { + "ty": 6, "span": 10, - "scope": 0 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { + { + "ty": 8, "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } + "mutability": "Not" }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { + { + "ty": 9, "span": 12, - "scope": 0 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + { + "ty": 10, + "span": 1, + "mutability": "Mut" }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 + { + "ty": 5, + "span": 2, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "ty": 11, + "span": 2, + "mutability": "Not" }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h3f415fb1ec534b7eE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } + ], + "spread_arg": null, + "span": 13 + } + ] } }, "details": null @@ -1920,10 +1942,10 @@ ], "types": [ [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } ], @@ -1950,10 +1972,10 @@ } ], [ - 2, + 9, { "RigidTy": { - "Int": "I8" + "Uint": "U8" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state index 3efc8ebed..8e72e0025 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -28,26 +28,26 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) .Bodies ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json index 4e7ec8790..15fb2e973 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json @@ -42,12 +42,6 @@ ] ], "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE" - } - ], [ 25, { @@ -61,21 +55,27 @@ } ], [ - 20, + 0, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 31, + 21, { - "NormalSym": "_ZN11refReturned1g17h1f19f83ec6e6cf29E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE" } ], [ - 0, + 26, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 31, + { + "NormalSym": "_ZN11refReturned1g17h1f19f83ec6e6cf29E" } ], [ @@ -85,1082 +85,714 @@ } ], [ - 21, + 13, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE" } ], [ - 14, + 20, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E" + "IntrinsicSym": "black_box" } ], [ - 32, + 14, { - "NoOpSym": "" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E" } ], [ - 26, + 32, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NoOpSym": "" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { "local": 3, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - } - ], - "destination": { - "local": 2, - "projection": [] + ] }, - "target": 2, - "unwind": "Continue" + "span": 43 } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] + } }, - { - "Use": { - "Copy": { + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] + "projection": [] } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { + ], + "destination": { "local": 0, "projection": [] }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + "target": 1, + "unwind": { + "Cleanup": 3 } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 + } }, - "span": 26 - }, - { + "span": 43 + } + }, + { + "statements": [], + "terminator": { "kind": { - "StorageDead": 2 + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } }, - "span": 27 + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + { + "ty": 12, + "span": 43, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "ty": 1, + "span": 43, + "mutability": "Not" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE", + "symbol_name": "_ZN11refReturned4main17haf3da80612a1db31E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { "local": 1, "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } } } - } - ], - "destination": { - "local": 0, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] } - } + ] }, - "args": [ - { + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 50, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 1, - "id": 4 + "ty": 25, + "id": 9 } } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 54 } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 } }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } }, - { - "Use": { + "args": [ + { "Constant": { - "span": 46, + "span": 32, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, 0 ], "provenance": { - "ptrs": [] + "ptrs": [ + [ + 0, + 0 + ] + ] }, - "align": 1, + "align": 8, "mutability": "Mut" } }, - "ty": 17, - "id": 8 + "ty": 27, + "id": 12 } } } - } - ] + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } }, - "span": 46 + "span": 57 } - ], - "terminator": { - "kind": "Return", - "span": 45 } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 + ], + "locals": [ + { + "ty": 1, + "span": 58, + "mutability": "Mut" }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + { + "ty": 2, + "span": 59, + "mutability": "Not" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN11refReturned1f17hec238a45891f1867E", - "mono_item_kind": { - "MonoItemFn": { - "name": "f", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 13 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" + { + "ty": 28, + "span": 60, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 2, + "span": 61, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 57, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 59, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 28, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 67, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 67, - "scope": 0 + "argument_index": null }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "name": "y", + "source_info": { + "span": 60, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h2966f97234df1366E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + { + "name": "z", + "source_info": { + "span": 61, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } + ], + "spread_arg": null, + "span": 62 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE", + "symbol_name": "_ZN11refReturned1f17hec238a45891f1867E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { + "name": "f", + "id": 7, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { + "args": [ + { + "Copy": { "local": 1, "projection": [] } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] } + ], + "destination": { + "local": 0, + "projection": [] }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 + "target": 1, + "unwind": "Continue" } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 28, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 67, + "mutability": "Not" } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 67, + "scope": 0 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - "span": 43 + "argument_index": 1 } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 68 + } + ] } }, "details": null }, { - "symbol_name": "_ZN11refReturned1g17h1f19f83ec6e6cf29E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h54c9713c41194453E", "mono_item_kind": { "MonoItemFn": { - "name": "g", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } }, - { - "Use": { - "Copy": { + "args": [ + { + "Move": { "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, "projection": [] } } - } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 70 + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 28, - "span": 71, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 72, - "scope": 0 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 73 - } + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null @@ -1171,801 +803,1183 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 + { + "kind": { + "StorageLive": 6 + }, + "span": 2 }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 + { + "kind": { + "StorageLive": 8 + }, + "span": 3 }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } ] - }, - [ + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, { "Copy": { - "local": 1, + "local": 7, "projection": [] } - } + }, + 5 ] - ] - } - ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 }, - "span": 3 + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 7, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, + "args": [ + { + "Move": { + "local": 1, "projection": [] } - ] - } - ] + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 2 - }, - { + "span": 33 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 6, + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, "projection": [] }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned1g17h1f19f83ec6e6cf29E", + "mono_item_kind": { + "MonoItemFn": { + "name": "g", + "id": 8, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 + } } - } + ] }, - "args": [ - { - "Move": { - "local": 6, + "span": 70 + } + ], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 28, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 72, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h2966f97234df1366E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } } }, - { - "Move": { - "local": 2, - "projection": [] + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 3, + "projection": [] }, - { - "Move": { - "local": 3, - "projection": [] + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } } }, - { - "Move": { - "local": 4, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } } - } - ], - "destination": { - "local": 5, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + "span": 23 }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] } - ] - } + }, + 16 + ] } - } - ] + ] + }, + "span": 24 }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 + { + "kind": { + "StorageDead": 6 + }, + "span": 25 }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "StorageDead": 5 + }, + "span": 26 }, - "span": 7 + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "terminator": { - "kind": "Return", - "span": 4 } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 11, + "span": 3, + "mutability": "Mut" }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 + { + "ty": 17, + "span": 16, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } + { + "ty": 1, + "span": 15, + "mutability": "Mut" }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 + { + "ty": 7, + "span": 17, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + { + "ty": 18, + "span": 22, + "mutability": "Mut" }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h54c9713c41194453E", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } } - } - ], - "destination": { - "local": 0, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" + "span": 46 } - }, - "span": 43 + ], + "terminator": { + "kind": "Return", + "span": 45 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 49 + } + ] } }, "details": null }, { - "symbol_name": "_ZN11refReturned4main17haf3da80612a1db31E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 - } - } - } - } - ] - }, - "span": 52 - }, - { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, + "Call": { + "func": { + "Move": { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + "args": [], + "destination": { + "local": 0, "projection": [] }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 + "target": 1, + "unwind": "Continue" } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 12 - } - } - } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 57 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 60, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Not" - }, - { - "ty": 2, - "span": 61, - "mutability": "Not" - }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 57, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 59, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + }, + "span": 43 } }, - "argument_index": null - }, - { - "name": "y", - "source_info": { - "span": 60, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 61, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + { + "ty": 7, + "span": 43, + "mutability": "Not" }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 62 - } + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null } ], "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], [ 29, { @@ -1973,10 +1987,10 @@ } ], [ - 9, + 16, { "RigidTy": { - "Uint": "U8" + "Int": "I32" } } ], @@ -1989,10 +2003,18 @@ } ], [ - 16, + 9, { "RigidTy": { - "Int": "I32" + "Uint": "U8" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state index 2eee4c407..8ffbb7679 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -28,27 +28,27 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json index 8e9ce0e20..d0219c989 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json @@ -43,33 +43,33 @@ ], "functions": [ [ - 21, + 20, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E" + "IntrinsicSym": "black_box" } ], [ - 25, + 19, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E" } ], [ - 23, + 21, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E" } ], [ - 20, + 13, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E" } ], [ - 0, + 30, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NoOpSym": "" } ], [ @@ -79,1665 +79,1683 @@ } ], [ - 30, + 0, { - "NoOpSym": "" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 19, + 25, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 13, + 23, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0e8fcda8fbc4c3b7E", "mono_item_kind": { "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { + "args": [ + { + "Move": { "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, "projection": [] } - ] - } - ] + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, "span": 43 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + ] }, - "target": 2, - "unwind": "Continue" + "span": 46 } - }, - "span": 43 + ], + "terminator": { + "kind": "Return", + "span": 45 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "argument_index": 1 } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 49 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 4, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } }, - { - "Use": { - "Copy": { + "args": [ + { + "Move": { "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } } - } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 17 + "span": 33 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } }, - "span": 15 + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { + ], + "spread_arg": null, + "span": 42 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { "local": 3, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - } - ], - "destination": { - "local": 2, - "projection": [] + ] }, - "target": 2, - "unwind": "Continue" + "span": 43 } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { + ], + "terminator": { "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] + "projection": [] } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { + ], + "destination": { "local": 0, "projection": [] }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + "target": 1, + "unwind": { + "Cleanup": 3 } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 + } }, - "span": 26 - }, - { + "span": 43 + } + }, + { + "statements": [], + "terminator": { "kind": { - "StorageDead": 2 + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } }, - "span": 27 + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + { + "ty": 12, + "span": 43, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "ty": 1, + "span": 43, + "mutability": "Not" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E", + "symbol_name": "_ZN6simple4main17hcc17a5a2c5cebe39E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } + "name": "main", + "id": 6, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 + } + } + } + } + ] }, - "args": [], - "destination": { - "local": 0, - "projection": [] + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] }, - "target": 1, - "unwind": "Continue" + "span": 50 } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 0, - "projection": [] + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } }, - { - "Use": { + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 50 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 10 + } + } + }, + "args": [ + { "Constant": { - "span": 46, + "span": 32, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, 0 ], "provenance": { - "ptrs": [] + "ptrs": [ + [ + 0, + 0 + ] + ] }, - "align": 1, + "align": 8, "mutability": "Mut" } }, - "ty": 17, - "id": 8 + "ty": 26, + "id": 11 } } } - } - ] + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } }, - "span": 46 + "span": 55 } - ], - "terminator": { - "kind": "Return", - "span": 45 } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 + ], + "locals": [ + { + "ty": 1, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 57, + "mutability": "Not" }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + { + "ty": 27, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 55, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 57, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } + }, + "argument_index": null }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8b592859fcbe523aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + { + "name": "y", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } + ], + "spread_arg": null, + "span": 60 + } + ] } }, "details": null }, { - "symbol_name": "_ZN6simple4main17hcc17a5a2c5cebe39E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 9 - } - } + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] } - } - ] - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 4, + "args": [], + "destination": { + "local": 0, "projection": [] }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 50 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 + "target": 1, + "unwind": "Continue" } - } - }, - "span": 50 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 10 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 55 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 57, - "mutability": "Not" - }, - { - "ty": 27, - "span": 58, - "mutability": "Not" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 55, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 57, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + }, + "span": 43 } }, - "argument_index": null - }, - { - "name": "y", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 3 + { + "ty": 7, + "span": 43, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 60 - } + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17hc7c2da63cbb13d2eE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 + { + "kind": { + "StorageLive": 3 + }, + "span": 15 }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 + { + "kind": { + "StorageLive": 4 + }, + "span": 17 }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", { - "Type": 4 + "Field": [ + 0, + 7 + ] } ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } } - ] - ] - } - ] - }, - "span": 3 - }, - { + } + } + ] + }, + "span": 17 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 7, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, + "args": [ + { + "Move": { + "local": 4, "projection": [] } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + } + ], + "destination": { + "local": 3, "projection": [] }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] + "target": 1, + "unwind": "Continue" + } }, - "span": 2 + "span": 15 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } } }, - { - "Move": { - "local": 2, - "projection": [] + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } } + ], + "destination": { + "local": 2, + "projection": [] }, - { - "Move": { - "local": 3, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] } - }, - { - "Move": { - "local": 4, + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } } - } - ], - "destination": { - "local": 5, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + "span": 23 }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] } - ] - } + }, + 16 + ] } - } - ] + ] + }, + "span": 24 }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 + { + "kind": { + "StorageDead": 6 + }, + "span": 25 }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "StorageDead": 5 + }, + "span": 26 }, - "span": 7 + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "terminator": { - "kind": "Return", - "span": 4 } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 11, + "span": 3, + "mutability": "Mut" }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 + { + "ty": 17, + "span": 16, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } + { + "ty": 1, + "span": 15, + "mutability": "Mut" }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 + { + "ty": 7, + "span": 17, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + { + "ty": 18, + "span": 22, + "mutability": "Mut" }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E", + "symbol_name": "_ZN3std2rt10lang_start17hc7c2da63cbb13d2eE", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] } - } + ] }, - "args": [ - { - "Move": { - "local": 1, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] } - }, - { + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 0, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 1, - "id": 4 + "ty": 0, + "id": 0 } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } - } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } } } - } - ], - "destination": { - "local": 2, - "projection": [] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - "target": 2, - "unwind": "Unreachable" + "span": 7 } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + ], + "terminator": { + "kind": "Return", + "span": 4 + } } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 + { + "ty": 8, + "span": 11, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "ty": 9, + "span": 12, + "mutability": "Not" }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 + { + "ty": 10, + "span": 1, + "mutability": "Mut" }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0e8fcda8fbc4c3b7E", + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8b592859fcbe523aE", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] } }, "details": null @@ -1745,10 +1763,10 @@ ], "types": [ [ - 2, + 16, { "RigidTy": { - "Int": "I8" + "Int": "I32" } } ], @@ -1775,10 +1793,10 @@ } ], [ - 16, + 2, { "RigidTy": { - "Int": "I32" + "Int": "I8" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.state b/kmir/src/tests/integration/data/exec-smir/references/simple.state index 760bb9fc5..8fcbeaeb2 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.state +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -27,24 +27,24 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json index f19b57050..742906ea4 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json @@ -3,7 +3,7 @@ "crate_id": 16077360951361859512, "allocs": [ [ - 8, + 9, { "Memory": { "bytes": [ @@ -28,12 +28,18 @@ 97, 46, 97, - 110, - 111, + 95, 116, 104, - 101, - 114 + 105, + 114, + 100, + 32, + 61, + 61, + 32, + 52, + 51 ], "provenance": { "ptrs": [] @@ -84,7 +90,7 @@ } ], [ - 5, + 6, { "Memory": { "bytes": [ @@ -120,7 +126,7 @@ 61, 32, 52, - 50 + 51 ], "provenance": { "ptrs": [] @@ -131,7 +137,7 @@ } ], [ - 9, + 5, { "Memory": { "bytes": [ @@ -157,17 +163,17 @@ 46, 97, 95, - 116, - 104, - 105, - 114, - 100, + 118, + 97, + 108, + 117, + 101, 32, 61, 61, 32, 52, - 51 + 50 ], "provenance": { "ptrs": [] @@ -178,7 +184,7 @@ } ], [ - 6, + 8, { "Memory": { "bytes": [ @@ -203,18 +209,12 @@ 97, 46, 97, - 95, - 118, - 97, - 108, - 117, + 110, + 111, + 116, + 104, 101, - 32, - 61, - 61, - 32, - 52, - 51 + 114 ], "provenance": { "ptrs": [] @@ -227,9 +227,9 @@ ], "functions": [ [ - 0, + 21, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE" } ], [ @@ -239,140 +239,229 @@ } ], [ - 20, + 23, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E" } ], [ - 14, + 27, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 23, + 44, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E" + "NoOpSym": "" } ], [ - 44, + 19, { - "NoOpSym": "" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E" } ], [ - 21, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 27, + 14, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E" } ], [ - 19, + 20, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E" + "IntrinsicSym": "black_box" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ea78c58d6db9c2E", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { "local": 0, "projection": [] }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } } } } - } - ] - }, - "span": 46 + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "terminator": { - "kind": "Return", - "span": 45 } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + ] } }, "details": null @@ -383,1494 +472,1496 @@ "MonoItemFn": { "name": "main", "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 9 + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 + } + } + }, + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 10 + } + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } } } + ] + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" }, { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 10 - } + "Mut": { + "kind": "Default" } }, { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - } + ] } ] - ] - } - ] + } + ] + }, + "span": 55 }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 12 } - ] + } } - ] - } - ] + } + ] + }, + "span": 57 }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - }, - "ty": 2, - "id": 12 + ] } } } - } - ] - }, - "span": 57 - }, - { + ] + }, + "span": 58 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] } + }, + "targets": { + "branches": [ + [ + 42, + 1 + ] + ], + "otherwise": 2 } - ] + } }, - "span": 58 + "span": 50 } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + ] + } + ] }, - "targets": { - "branches": [ - [ - 42, - 1 - ] - ], - "otherwise": 2 - } - } - }, - "span": 50 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 5, + "projection": [] } - }, - { - "local": 1, + ] + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [] + }, + { + "CopyForDeref": { + "local": 6, "projection": [ - { - "Field": [ - 0, - 2 - ] - } + "Deref" ] } - ] - } - ] + } + ] + }, + "span": 62 }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 43 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 + } } - }, - { - "local": 5, - "projection": [] } - ] - } - ] + } + ] + }, + "span": 62 }, - "span": 61 - }, - { + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] + }, + "span": 64 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 20, - "projection": [] + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } }, - { - "CopyForDeref": { - "local": 6, - "projection": [ - "Deref" + "targets": { + "branches": [ + [ + 43, + 3 ] - } + ], + "otherwise": 4 } - ] + } }, - "span": 62 - }, - { + "span": 59 + } + }, + { + "statements": [], + "terminator": { "kind": { - "Assign": [ - { - "local": 20, - "projection": [ - "Deref" - ] + "Call": { + "func": { + "Constant": { + "span": 65, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } }, - { - "Use": { + "args": [ + { "Constant": { - "span": 63, + "span": 32, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 43 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 ], "provenance": { - "ptrs": [] + "ptrs": [ + [ + 0, + 0 + ] + ] }, - "align": 1, + "align": 8, "mutability": "Mut" } }, - "ty": 2, - "id": 13 + "ty": 28, + "id": 15 } } } - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 7, + ], + "destination": { + "local": 4, "projection": [] }, - { - "Use": { - "Copy": { - "local": 1, + "target": null, + "unwind": "Continue" + } + }, + "span": 65 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 67 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 8, + 0, + [ + { + "Lifetime": { + "kind": "ReErased" + } + } + ], + null, + null + ] + }, + [ + { + "Copy": { + "local": 10, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 68 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 9, + "projection": [] + } + ] + } + ] + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 21, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, "projection": [ + "Deref", { "Field": [ 0, - 2 + 29 ] } ] } } - } - ] + ] + }, + "span": 70 }, - "span": 64 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 21, + "projection": [ + "Deref", + { + "Field": [ + 0, + 2 + ] + } + ] + } + } + } + ] }, - "targets": { - "branches": [ - [ - 43, - 3 - ] - ], - "otherwise": 4 - } + "span": 70 } - }, - "span": 59 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 65, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 12, + "projection": [] } + }, + "targets": { + "branches": [ + [ + 43, + 5 + ] + ], + "otherwise": 6 } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 15 - } - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 65 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 67 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 8, - 0, - [ - { - "Lifetime": { - "kind": "ReErased" - } - } - ], - null, - null - ] - }, - [ - { - "Copy": { - "local": 10, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 68 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 9, - "projection": [] - } - ] - } - ] - }, - "span": 69 - }, - { - "kind": { - "Assign": [ - { - "local": 21, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ - 0, - 29 - ] - } - ] - } - } - ] - }, - "span": 70 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 21, - "projection": [ - "Deref", - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] + } }, - "span": 70 + "span": 66 } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 12, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 43, - 5 - ] - ], - "otherwise": 6 - } - } - }, - "span": 66 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 71, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 - } - } - }, - "args": [ - { + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 71, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 16 + "kind": "ZeroSized", + "ty": 27, + "id": 14 } } - } - ], - "destination": { - "local": 8, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 71 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ - 0, - 29 - ] - } - ] - } - } - ] - }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [ - "Deref", - { - "Field": [ - 1, - 25 - ] - } - ] }, - { - "Use": { + "args": [ + { "Constant": { - "span": 74, + "span": 32, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 1 + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 ], "provenance": { - "ptrs": [] + "ptrs": [ + [ + 0, + 1 + ] + ] }, - "align": 1, + "align": 8, "mutability": "Mut" } }, - "ty": 25, - "id": 17 + "ty": 28, + "id": 16 } } } - } - ] - }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 23, + ], + "destination": { + "local": 8, "projection": [] }, - { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ - 0, - 29 - ] - } - ] - } - } - ] + "target": null, + "unwind": "Continue" + } }, - "span": 75 - }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 23, + "span": 71 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 22, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, "projection": [ "Deref", { "Field": [ - 2, - 26 + 0, + 29 ] } ] } - ] - } - ] + } + ] + }, + "span": 73 }, - "span": 75 - }, - { - "kind": { - "Assign": [ - { - "local": 24, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, + { + "kind": { + "Assign": [ + { + "local": 22, "projection": [ "Deref", { "Field": [ - 0, - 29 + 1, + 25 ] } ] + }, + { + "Use": { + "Constant": { + "span": 74, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 17 + } + } + } } - } - ] + ] + }, + "span": 73 }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 24, + { + "kind": { + "Assign": [ + { + "local": 23, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, "projection": [ "Deref", { "Field": [ 0, - 2 + 29 ] } ] } } - } - ] + ] + }, + "span": 75 }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [ - "Deref" - ] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 15, - "projection": [] + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 23, + "projection": [ + "Deref", + { + "Field": [ + 2, + 26 + ] + } + ] } - }, - 26 - ] - } - ] + ] + } + ] + }, + "span": 75 }, - "span": 77 - }, - { - "kind": { - "Assign": [ - { - "local": 16, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, + { + "kind": { + "Assign": [ + { + "local": 24, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, "projection": [ + "Deref", { "Field": [ - 1, - 25 + 0, + 29 ] } ] } } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 16, - "projection": [] - } + ] }, - "targets": { - "branches": [ - [ - 0, - 8 - ] - ], - "otherwise": 7 - } - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 24, + "projection": [ + "Deref", + { + "Field": [ + 0, + 2 + ] + } + ] + } + } } - } + ] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 2 - ] - ] - }, - "align": 8, - "mutability": "Mut" + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [ + "Deref" + ] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 15, + "projection": [] } }, - "ty": 28, - "id": 18 + 26 + ] + } + ] + }, + "span": 77 + }, + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } } } - } - ], - "destination": { - "local": 13, - "projection": [] + ] }, - "target": null, - "unwind": "Continue" + "span": 72 } - }, - "span": 78 - } - }, - { - "statements": [ - { + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 18, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 26 - ] - } - ] - } + "SwitchInt": { + "discr": { + "Move": { + "local": 16, + "projection": [] } + }, + "targets": { + "branches": [ + [ + 0, + 8 + ] + ], + "otherwise": 7 } - ] + } }, - "span": 80 + "span": 72 } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 18, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 43, - 9 - ] - ], - "otherwise": 10 - } - } - }, - "span": 79 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 81, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 - } - } - }, - "args": [ - { + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 78, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 27, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 3 + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 2 + ] ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 18 + } + } + } + ], + "destination": { + "local": 13, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 78 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 18, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 26 ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 19 + } + ] + } } } - } - ], - "destination": { - "local": 17, - "projection": [] + ] }, - "target": null, - "unwind": "Continue" + "span": 80 } - }, - "span": 81 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 82 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 83, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 18, + "projection": [] } + }, + "targets": { + "branches": [ + [ + 43, + 9 + ] + ], + "otherwise": 10 } - }, - "args": [ - { + } + }, + "span": 79 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 81, "user_ty": null, "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 4 + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 3 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 19 + } + } + } + ], + "destination": { + "local": 17, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 81 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 82 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 4 + ] ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 20 + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 20 + } } } - } - ], - "destination": { - "local": 19, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 83 + ], + "destination": { + "local": 19, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 83 + } } - } - ], - "locals": [ - { - "ty": 1, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 85, - "mutability": "Mut" - }, - { - "ty": 31, - "span": 86, - "mutability": "Not" - }, - { - "ty": 2, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 31, - "span": 87, - "mutability": "Mut" - }, - { - "ty": 33, - "span": 88, - "mutability": "Not" - }, - { - "ty": 2, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 71, - "mutability": "Mut" - }, - { - "ty": 34, - "span": 89, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 67, - "mutability": "Mut" - }, - { - "ty": 35, - "span": 90, - "mutability": "Not" - }, - { - "ty": 2, - "span": 91, - "mutability": "Not" - }, - { - "ty": 32, - "span": 78, - "mutability": "Mut" - }, - { - "ty": 36, - "span": 92, - "mutability": "Not" - }, - { - "ty": 2, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 31, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 85, - "scope": 1 + ], + "locals": [ + { + "ty": 1, + "span": 84, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "ty": 30, + "span": 85, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "r1", - "source_info": { + { + "ty": 31, "span": 86, - "scope": 2 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 2, + "span": 58, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "r1", - "source_info": { - "span": 87, - "scope": 3 + { + "ty": 32, + "span": 65, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "ty": 31, + "span": 87, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "r2", - "source_info": { + { + "ty": 33, "span": 88, - "scope": 4 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } + { + "ty": 2, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 71, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "e", - "source_info": { + { + "ty": 34, "span": 89, - "scope": 5 + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 9, - "projection": [] - } + { + "ty": 29, + "span": 67, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "ee", - "source_info": { + { + "ty": 35, "span": 90, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 11, - "projection": [] - } + "mutability": "Not" }, - "argument_index": null - }, - { - "name": "vv", - "source_info": { + { + "ty": 2, "span": 91, - "scope": 7 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 12, - "projection": [] - } + { + "ty": 32, + "span": 78, + "mutability": "Mut" }, - "argument_index": null - }, - { - "name": "r3", - "source_info": { + { + "ty": 36, "span": 92, - "scope": 8 + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 14, - "projection": [] - } + { + "ty": 2, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 85, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "r1", + "source_info": { + "span": 86, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "r1", + "source_info": { + "span": 87, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "r2", + "source_info": { + "span": 88, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 89, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "ee", + "source_info": { + "span": 90, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "vv", + "source_info": { + "span": 91, + "scope": 7 + }, + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } + }, + "argument_index": null }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 93 - } + { + "name": "r3", + "source_info": { + "span": 92, + "scope": 8 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 93 + } + ] } }, "details": null @@ -1881,419 +1972,356 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 + { + "kind": { + "StorageLive": 6 + }, + "span": 2 }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 + { + "kind": { + "StorageLive": 8 + }, + "span": 3 }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ { - "Copy": { - "local": 1, - "projection": [] + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] + } + ] + }, + "span": 3 }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 + ] } - } + ] }, - "args": [ - { - "Move": { + "span": 2 + }, + { + "kind": { + "Assign": [ + { "local": 6, "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] } - }, - { - "Move": { - "local": 2, - "projection": [] + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } } }, - { - "Move": { - "local": 3, - "projection": [] + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 5, + "projection": [] }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + "span": 5 }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } } } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 + ] + }, + "span": 6 }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + { + "kind": { + "StorageDead": 8 + }, + "span": 7 }, - "span": 7 + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "terminator": { - "kind": "Return", - "span": 4 } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, "span": 9, - "scope": 0 + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } + { + "ty": 9, + "span": 12, + "mutability": "Not" }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 + { + "ty": 10, + "span": 1, + "mutability": "Mut" }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + { + "ty": 5, + "span": 2, + "mutability": "Mut" }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 + { + "ty": 11, + "span": 2, + "mutability": "Not" }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "argument_index": null } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 13 + } + ] } }, "details": null @@ -2304,357 +2332,518 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>::{closure#0}", "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 + { + "kind": { + "StorageLive": 3 + }, + "span": 15 }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 + { + "kind": { + "StorageLive": 4 + }, + "span": 17 }, - "span": 17 - }, - { + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { "kind": { - "Assign": [ - { - "local": 4, - "projection": [] + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "args": [ + { + "Move": { + "local": 4, + "projection": [] } } - } - ] + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } }, - "span": 17 + "span": 15 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } } - } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 }, - "args": [ - { - "Move": { - "local": 4, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] } - } - ], - "destination": { - "local": 3, - "projection": [] + ] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + "span": 22 }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } } - } + ] }, - "args": [ - { - "Move": { - "local": 3, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] } - } - ], - "destination": { - "local": 2, - "projection": [] + ] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 + "span": 24 }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 }, - "span": 22 + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 ] } ] - }, - "span": 22 + } }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } - ] + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { "local": 0, "projection": [] }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + "target": 1, + "unwind": { + "Cleanup": 3 } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 + } }, - "span": 26 - }, - { + "span": 43 + } + }, + { + "statements": [], + "terminator": { "kind": { - "StorageDead": 2 + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } }, - "span": 27 + "span": 43 } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 } }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null @@ -2665,454 +2854,283 @@ "MonoItemFn": { "name": "std::sys::backtrace::__rust_begin_short_backtrace::", "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 31, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 1, - "id": 4 + "ty": 19, + "id": 3 } } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } } - } - }, - "args": [ - { + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { "Constant": { - "span": 32, + "span": 34, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 1, - "id": 4 + "ty": 20, + "id": 5 } } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - { - "local": 1, - "projection": [] } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] } + ], + "destination": { + "local": 2, + "projection": [] }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 + "target": 2, + "unwind": "Unreachable" } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - "span": 43 + "argument_index": 1 } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "spread_arg": null, + "span": 42 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ea78c58d6db9c2E", + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h65a2c197bce21f15E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + ] } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h65a2c197bce21f15E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "name": ">::call_once", + "id": 3, + "body": [ + { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + ] } }, "details": null @@ -3120,56 +3138,56 @@ ], "types": [ [ - 41, + 16, { "RigidTy": { - "Uint": "U32" + "Int": "I32" } } ], [ - 25, + 6, { - "RigidTy": "Bool" + "RigidTy": { + "Int": "Isize" + } } ], [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } ], [ - 26, + 9, { "RigidTy": { - "Uint": "Usize" + "Uint": "U8" } } ], [ - 6, + 26, { "RigidTy": { - "Int": "Isize" + "Uint": "Usize" } } ], [ - 2, + 25, { - "RigidTy": { - "Int": "I8" - } + "RigidTy": "Bool" } ], [ - 16, + 41, { "RigidTy": { - "Int": "I32" + "Uint": "U32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state index 67d5e6749..5b683d8de 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -35,45 +35,45 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 43 , 64 , false ) , ty ( 26 ) , mutabilityMut ) ) ) , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 43 , 64 , false ) , ty ( 26 ) , mutabilityMut ) ) ) , ty ( 30 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 33 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 33 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) ) , ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 36 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) ) , ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 36 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) .Bodies ) .Map @@ -90,4 +90,5 @@ ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) ty ( 41 ) |-> rigidTyUint ( uintTyU32 ) - \ No newline at end of file + + diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json index 9b47e0ca3..ce1206711 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json @@ -1,1895 +1 @@ -{ - "name": "struct_field_update", - "crate_id": 10235230017850619163, - "allocs": [], - "functions": [ - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E" - } - ], - [ - 32, - { - "NoOpSym": "" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h7596bfce4c2de521E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN19struct_field_update4main17h502cdc578af7c9e8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Aggregate": [ - "Tuple", - [ - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 9 - } - } - }, - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 2, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 10 - } - } - } - ] - ] - } - ] - }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ - { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 11 - } - } - }, - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 12 - } - } - }, - { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 36, - 64 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 13 - } - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - }, - { - "Use": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 14 - } - } - } - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [ - { - "Field": [ - 3, - 27 - ] - }, - { - "Field": [ - 1, - 16 - ] - } - ] - }, - { - "Use": { - "Move": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 3, - 27 - ] - }, - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - }, - { - "Use": { - "Move": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "span": 63 - }, - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 26 - ] - } - ] - }, - { - "Use": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 51, - 51, - 51, - 51, - 51, - 115, - 69, - 64 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 15 - } - } - } - } - ] - }, - "span": 65 - } - ], - "terminator": { - "kind": "Return", - "span": 50 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 67, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 53, - "mutability": "Mut" - }, - { - "ty": 16, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 16, - "span": 62, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "s", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h09bc4ea8ad5997d5E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h21cb4ff546418550E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 26, - { - "RigidTy": { - "Float": "F64" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 25, - { - "RigidTy": "Bool" - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ] - ], - "debug": null -} +{"name":"struct_field_update","crate_id":10235230017850619163,"allocs":[],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE"}],[20,{"IntrinsicSym":"black_box"}],[32,{"NoOpSym":""}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start17h7596bfce4c2de521E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN19struct_field_update4main17h502cdc578af7c9e8E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Aggregate":["Tuple",[{"Constant":{"span":51,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":9}}},{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[2,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}]]}]},"span":53},{"kind":{"Assign":[{"local":1,"projection":[]},{"Aggregate":[{"Adt":[7,0,[],null,null]},[{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[10,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":11}}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":25,"id":12}}},{"Constant":{"span":56,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,36,64],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":13}}},{"Move":{"local":2,"projection":[]}}]]}]},"span":57},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[1,25]}]},{"Use":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":25,"id":14}}}}]},"span":59},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[{"Field":[0,16]}]}}}]},"span":60},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[3,27]},{"Field":[1,16]}]},{"Use":{"Move":{"local":3,"projection":[]}}}]},"span":61},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[{"Field":[3,27]},{"Field":[0,16]}]}}}]},"span":62},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[0,16]}]},{"Use":{"Move":{"local":4,"projection":[]}}}]},"span":63},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[2,26]}]},{"Use":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[51,51,51,51,51,115,69,64],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":15}}}}]},"span":65}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"},{"ty":28,"span":67,"mutability":"Mut"},{"ty":27,"span":53,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Mut"},{"ty":16,"span":62,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"s","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h09bc4ea8ad5997d5E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h21cb4ff546418550E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null}],"types":[[16,{"RigidTy":{"Int":"I32"}}],[26,{"RigidTy":{"Float":"F64"}}],[25,{"RigidTy":"Bool"}],[2,{"RigidTy":{"Int":"I8"}}],[6,{"RigidTy":{"Int":"Isize"}}],[9,{"RigidTy":{"Uint":"U8"}}]],"debug":null} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state index db5f4e5c3..59c8c4af0 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state @@ -25,12 +25,12 @@ unwindActionUnreachable - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedValue ( Any , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) ) , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 28 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) + ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Any , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) ) , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 28 ) , mutabilityMut ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) @@ -40,12 +40,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state index 3092d7d0d..8be197b47 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state @@ -25,38 +25,38 @@ unwindActionContinue - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedLocal ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityNot ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedLocal ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedLocal ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) + ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( noValue ( ty ( 16 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 26 ) , mutabilityMut ) ) + ListItem ( noValue ( ty ( 27 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) ) ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) .Bodies ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) .Bodies ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state deleted file mode 100644 index 3092d7d0d..000000000 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state +++ /dev/null @@ -1,75 +0,0 @@ - - - #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ~> .K - - - noReturn - - - ty ( 25 ) - - - - ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ) - - - ty ( -1 ) - - - place (... local: local ( 4 ) , projection: .ProjectionElems ) - - - someBasicBlockIdx ( basicBlockIdx ( 1 ) ) - - - unwindActionContinue - - - ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) - - - - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedValue ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( Moved ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( Moved ) - ListItem ( Moved ) - ListItem ( Moved ) - ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) - ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) - - - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) ) ) - - - .Map - - - symbol ( "main" ) - - - ty ( 2 ) |-> rigidTyInt ( intTyI8 ) - ty ( 6 ) |-> rigidTyInt ( intTyIsize ) - ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) - ty ( 16 ) |-> rigidTyInt ( intTyI32 ) - ty ( 26 ) |-> rigidTyBool - ty ( 27 ) |-> rigidTyFloat ( floatTyF64 ) - - \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json index f04cd7ef4..2100e09fd 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json @@ -1,2111 +1,2131 @@ { - "name": "structs_tuples", - "crate_id": 4825803685595141642, - "allocs": [], - "functions": [ - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE" - } + "name": "struct_tuple_fields", + "crate_id": 15052015653515667555, + "allocs": [], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 25, + { + "NormalSym": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E" + } + ], + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ] ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE" - } - ], - [ - 25, - { - "NormalSym": "_ZN14structs_tuples3foo17h3890d1fc66f78799E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 33, - { - "NoOpSym": "" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0fc835eb50e37b13E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN14structs_tuples3foo17h3890d1fc66f78799E", - "mono_item_kind": { - "MonoItemFn": { - "name": "foo", - "id": 8, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 73 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 16, - "span": 75, - "mutability": "Not" - }, - { - "ty": 26, - "span": 76, - "mutability": "Not" - }, - { - "ty": 27, - "span": 77, - "mutability": "Not" - } - ], - "arg_count": 3, - "var_debug_info": [ - { - "name": "_i", - "source_info": { - "span": 75, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "_b", - "source_info": { - "span": 76, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "_f", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - } - ], - "spread_arg": null, - "span": 78 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h35bcf3f6dc6c431bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h12e57977f213b84cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": [ { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": [ { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ + "blocks": [ { - "Downcast": 0 + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } }, { - "Field": [ - 0, - 6 - ] + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } } - ] - } - } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + ] } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN14structs_tuples4main17hc13d6b1ad2ba5288E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": [ { - "Aggregate": [ - { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 }, - "align": 4, - "mutability": "Mut" - } - }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { "ty": 16, - "id": 10 - } + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - "ty": 26, - "id": 11 - } - } - }, - { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 36, - 64 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } }, - "ty": 27, - "id": 12 - } + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 } - } - ] - ] + ], + "spread_arg": null, + "span": 3 } - ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 27 - ] + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } } - ] - } - } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN19struct_tuple_fields4main17he368ec089685e92cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": [ { - "Aggregate": [ - "Tuple", - [ - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 11, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 10 + } + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + }, + { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 36, + 64 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ] + ] + } + ] + }, + "span": 55 }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 13 - } - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 27 + ] + } + ] + } + } + } + ] + }, + "span": 56 }, - "align": 1, - "mutability": "Mut" - } - }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Aggregate": [ + "Tuple", + [ + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 11, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 13 + } + } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 14 + } + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 16 + ] + } + ] + } + } + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 26 + ] + } + ] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 27 + ] + } + ] + } + } + } + ] + }, + "span": 62 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 7, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 16 + ] + } + ] + } + } + } + ] + }, + "span": 65 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 26 + ] + } + ] + } + } + } + ] + }, + "span": 66 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 2, + 27 + ] + } + ] + } + } + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 9, + "projection": [] + } + }, + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Move": { + "local": 11, + "projection": [] + } + } + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 68 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 70, + "mutability": "Not" + }, + { + "ty": 29, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + }, + { + "ty": 16, + "span": 60, + "mutability": "Mut" + }, + { "ty": 26, - "id": 14 - } + "span": 61, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + }, + { + "ty": 16, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 67, + "mutability": "Mut" } - }, - { - "Move": { - "local": 3, - "projection": [] + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 70, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "t", + "source_info": { + "span": 71, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null } - } - ] - ] + ], + "spread_arg": null, + "span": 72 } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, + ] + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": [ { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 16 - ] + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } } - ] - } - } - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 26 - ] + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 27 - ] + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - ] - } - } - } - ] - }, - "span": 62 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 7, - "projection": [] - } + ], + "spread_arg": null, + "span": 49 } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 + ] } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": [ { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 16 - ] + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } } - ] - } - } - } - ] - }, - "span": 65 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 26 - ] + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 66 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 2, - 27 - ] + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 } - ] - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 9, - "projection": [] - } - }, - { - "Move": { - "local": 10, - "projection": [] - } - }, - { - "Move": { - "local": 11, - "projection": [] - } + ], + "spread_arg": null, + "span": 42 } - ], - "destination": { - "local": 8, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 68 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 70, - "mutability": "Not" - }, - { - "ty": 29, - "span": 71, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 51, - "mutability": "Not" - }, - { - "ty": 16, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 62, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - }, - { - "ty": 16, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 67, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "s", - "source_info": { - "span": 70, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "t", - "source_info": { - "span": 71, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 72 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hb9b0e627f12f2913E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": [ { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 + ] } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ + }, + "details": null + }, + { + "symbol_name": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "foo", + "id": 8, + "body": [ { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 73 + } } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + ], + "locals": [ + { + "ty": 1, + "span": 74, + "mutability": "Mut" }, { - "Field": [ - 0, - 9 - ] + "ty": 16, + "span": 75, + "mutability": "Not" + }, + { + "ty": 26, + "span": 76, + "mutability": "Not" + }, + { + "ty": 27, + "span": 77, + "mutability": "Not" } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + ], + "arg_count": 3, + "var_debug_info": [ + { + "name": "_i", + "source_info": { + "span": 75, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "_b", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "_f", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + } + ], + "spread_arg": null, + "span": 78 } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ea230cb4a81ac50E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": [ { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } + }, + "details": null } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + } + ], + [ + 26, + { + "RigidTy": "Bool" + } + ], + [ + 27, + { + "RigidTy": { + "Float": "F64" } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcc7804faa37550b8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - } - ], - "types": [ - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } + } + ] ], - [ - 27, - { - "RigidTy": { - "Float": "F64" - } - } - ], - [ - 26, - { - "RigidTy": "Bool" - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ] - ], - "debug": null -} + "debug": null +} \ No newline at end of file diff --git a/kmir/src/tests/integration/data/proving/unchecked-add-spec.k b/kmir/src/tests/integration/data/proving/unchecked-add-spec.k deleted file mode 100644 index f77039109..000000000 --- a/kmir/src/tests/integration/data/proving/unchecked-add-spec.k +++ /dev/null @@ -1,75 +0,0 @@ -module UNCHECKED-ADD-SPEC - imports KMIR - - claim [unchecked-ADD-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody (body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - - requires // i16 invariants - 0 -Int (1 < None: +def test_prove(test_data: tuple[str, Path], tmp_path: Path, kmir: KMIR) -> None: testname, smir_json = test_data spec_file = tmp_path / f'{testname}.k' gen_opts = GenSpecOpts(smir_json, spec_file, 'main') @@ -365,23 +364,3 @@ def test_prove_termination(test_data: tuple[str, Path], tmp_path: Path, kmir: KM for label in claim_labels: proof = Proof.read_proof_data(proof_dir, label) assert proof.passed - - -PROVING_DIR = (Path(__file__).parent / 'data' / 'proving').resolve(strict=True) -PROVING_FILES = list(PROVING_DIR.glob('*-spec.k')) - - -@pytest.mark.parametrize( - 'spec', - PROVING_FILES, - ids=[spec.stem for spec in PROVING_FILES], -) -def test_prove(spec: Path, tmp_path: Path, kmir: KMIR) -> None: - proof_dir = tmp_path / (spec.stem + 'proofs') - prove_opts = ProveRunOpts(spec, proof_dir, None, None) - _kmir_prove_run(prove_opts) - - claim_labels = kmir.get_claim_index(spec).labels() - for label in claim_labels: - proof = Proof.read_proof_data(proof_dir, label) - assert proof.passed diff --git a/package/version b/package/version index 0793ec760..c2f74cb52 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.107 +0.3.108 From e1ba203090b59097aff2093bb299d7a5a4f36ec3 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Thu, 27 Mar 2025 22:02:06 -0300 Subject: [PATCH 19/84] Manually resolving conflict with master --- kmir/pyproject.toml | 4 ++-- kmir/src/kmir/__init__.py | 2 +- package/version | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index dcc4cafaf..0e3efbeff 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.108" +version = "0.3.109" description = "" authors = [ "Runtime Verification, Inc. ", @@ -58,4 +58,4 @@ line-length = 120 skip-string-normalization = true [tool.mypy] -disallow_untyped_defs = true +disallow_untyped_defs = true \ No newline at end of file diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index f47ac201c..0e5933cd0 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.108' +VERSION: Final = '0.3.109' diff --git a/package/version b/package/version index c2f74cb52..7b32a6e29 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.108 +0.3.109 From d5573135b79eb402475558bf386220adbcf9a787 Mon Sep 17 00:00:00 2001 From: ACassimiro Date: Thu, 27 Mar 2025 22:02:24 -0300 Subject: [PATCH 20/84] Merging master into branch (#514) Co-authored-by: Daniel Cumming <124537596+dkcumming@users.noreply.github.com> Co-authored-by: devops Co-authored-by: Jost Berthold --- README.md | 15 +- deps/stable-mir-json | 2 +- kmir/src/kmir/kdist/mir-semantics/body.md | 6 +- kmir/src/kmir/kdist/mir-semantics/kmir.md | 108 +- .../kdist/mir-semantics/lemmas/kmir-lemmas.md | 2 - kmir/src/kmir/kdist/mir-semantics/mono.md | 2 +- kmir/src/kmir/kdist/mir-semantics/rt/data.md | 626 +- kmir/src/kmir/parse/notes.md | 2 +- kmir/src/kmir/parse/parser.py | 2 +- .../arithmetic-unchecked-runs.smir.json | 7194 ++++++++--------- .../arithmetic-unchecked-runs.state | 48 +- .../exec-smir/arithmetic/arithmetic.smir.json | 5434 +++++++------ .../exec-smir/arithmetic/arithmetic.state | 54 +- .../data/exec-smir/arithmetic/unary.smir.json | 3770 +++++---- .../data/exec-smir/arithmetic/unary.state | 26 +- .../assign-cast/assign-cast.smir.json | 2162 ++++- .../exec-smir/assign-cast/assign-cast.state | 44 +- .../call-with-args/main-a-b-with-int.23.state | 28 +- .../call-with-args/main-a-b-with-int.27.state | 62 + .../main-a-b-with-int.smir.json | 3378 ++++---- .../exec-smir/main-a-b-c/main-a-b-c.19.state | 26 +- .../exec-smir/main-a-b-c/main-a-b-c.run.state | 20 +- .../exec-smir/main-a-b-c/main-a-b-c.smir.json | 1660 +++- .../exec-smir/references/doubleRef.smir.json | 4450 +++++----- .../data/exec-smir/references/doubleRef.state | 36 +- .../exec-smir/references/mutableRef.smir.json | 3430 ++++---- .../exec-smir/references/mutableRef.state | 31 +- .../exec-smir/references/refAsArg.smir.json | 3114 ++++--- .../data/exec-smir/references/refAsArg.state | 24 +- .../exec-smir/references/refAsArg2.smir.json | 3190 ++++---- .../data/exec-smir/references/refAsArg2.state | 26 +- .../references/refReturned.smir.json | 3334 ++++---- .../exec-smir/references/refReturned.state | 28 +- .../exec-smir/references/simple.smir.json | 2936 ++++--- .../data/exec-smir/references/simple.state | 22 +- .../exec-smir/references/weirdRefs.smir.json | 5038 ++++++------ .../data/exec-smir/references/weirdRefs.state | 59 +- .../struct_field_update.smir.json | 1896 ++++- .../structs-tuples/struct_field_update.state | 24 +- .../structs-tuples/structs-tuples.84.state | 46 +- .../structs-tuples/structs-tuples.90.state | 75 + .../structs-tuples/structs-tuples.smir.json | 4112 +++++----- .../data/proving/unchecked-add-spec.k | 75 + .../data/schema-parse/monoitem/input.json | 619 ++ .../data/schema-parse/monoitem/reference.kmir | 12 + .../data/schema-parse/monoitem/reference.sort | 1 + .../src/tests/integration/test_integration.py | 31 +- 47 files changed, 31825 insertions(+), 25455 deletions(-) create mode 100644 kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state create mode 100644 kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state create mode 100644 kmir/src/tests/integration/data/proving/unchecked-add-spec.k create mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/input.json create mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/reference.kmir create mode 100644 kmir/src/tests/integration/data/schema-parse/monoitem/reference.sort diff --git a/README.md b/README.md index 7e3e7eb78..e9312659b 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ If you would like to try a legacy version of the project, [this blog post](https ## For Developers -### Setup +### KMIR Setup -Pre-requisites: `python >= 3.10`, `pip >= 20.0.2`, `poetry >= 1.3.2`. +Pre-requisites: `python >= 3.10`, `pip >= 20.0.2`, `poetry >= 1.3.2`, `gcc >= 11.4.0`, `cargo == nightly-2024-11-29`, `k >= v7.1.205`. To install K, follow the steps available in [K's Quick Start instructions](https://github.com/runtimeverification/k?tab=readme-ov-file#quick-start). ```bash make build @@ -23,6 +23,17 @@ Use `make` to run common tasks (see the [Makefile](Makefile) for a complete list For interactive use, spawn a shell with `poetry -C kmir/ shell` (after `poetry -C kmir/ install`), then run an interpreter. Or directly run from `mir-semantics` root with `poetry run -C kmir kmir ` +### Stable-MIR-JSON Setup + +At the moment, to interact with some of KMIR functionalities, it is necessary to provide the tool with a serialized JSON of a Rust program's Stable MIR. To be able to extract these serialized SMIR JSONs, you can use the `Stable-MIR-JSON` tool, setting it up with the following commands: + +```Rust +git submodule update --init --recursive +make stable-mir-json +``` + +For more information on testing, installation, and general usage of this tool, please check [Stable-MIR-JSON's repository](https://github.com/runtimeverification/stable-mir-json/). + ## Usage Use `--help` with each command for more details. diff --git a/deps/stable-mir-json b/deps/stable-mir-json index fbdfe361d..463282e2c 160000 --- a/deps/stable-mir-json +++ b/deps/stable-mir-json @@ -1 +1 @@ -Subproject commit fbdfe361d79a7d125d4ff70fb7c7b354eee483ee +Subproject commit 463282e2c3abba3db87323c29df19d24c3363dfb diff --git a/kmir/src/kmir/kdist/mir-semantics/body.md b/kmir/src/kmir/kdist/mir-semantics/body.md index 4a175b6ec..32f13531e 100644 --- a/kmir/src/kmir/kdist/mir-semantics/body.md +++ b/kmir/src/kmir/kdist/mir-semantics/body.md @@ -5,7 +5,7 @@ requires "ty.md" module BODY-SORTS syntax Body -syntax Bodies +syntax MaybeBody syntax DefId syntax MaybeInt syntax MIRBool @@ -355,10 +355,10 @@ syntax VarDebugInfo ::= varDebugInfo(name: Symbol, sourceInfo: SourceInfo, compo syntax VarDebugInfos ::= List {VarDebugInfo, ""} [group(mir-list), symbol(VarDebugInfos::append), terminator-symbol(VarDebugInfos::empty)] +syntax MaybeBody ::= someBody(Body) [group(mir-option)] + | "noBody" [group(mir-option)] syntax Body ::= body(blocks: BasicBlocks, locals: LocalDecls, argCount: MIRInt, varDebugInfo: VarDebugInfos, spreadArg: MaybeLocal, span: Span) [group(mir---blocks--locals--arg-count--var-debug-info--spread-arg--span)] -syntax Bodies ::= List {Body, ""} - [group(mir-list), symbol(Bodies::append), terminator-symbol(Bodies::empty)] endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/kmir.md b/kmir/src/kmir/kdist/mir-semantics/kmir.md index dcf29818e..d7886dac8 100644 --- a/kmir/src/kmir/kdist/mir-semantics/kmir.md +++ b/kmir/src/kmir/kdist/mir-semantics/kmir.md @@ -219,7 +219,7 @@ be known to populate the `currentFunc` field. rule #execFunction( monoItem( SYMNAME, - monoItemFn(_, _, body((FIRST:BasicBlock _) #as BLOCKS,LOCALS, _, _, _, _) .Bodies) + monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS,LOCALS, _, _, _, _))) ), FUNCTIONNAMES ) @@ -259,7 +259,7 @@ be known to populate the `currentFunc` field. rule #reserveFor(localDecl(TY, _, MUT) REST:LocalDecls) => - ListItem(noValue(TY, MUT)) #reserveFor(REST) + ListItem(newLocal(TY, MUT)) #reserveFor(REST) ``` Executing a function body consists of repeated calls to `#execBlock` @@ -312,19 +312,12 @@ will effectively be no-ops at this level). // all memory accesses relegated to another module (to be added) rule #execStmt(statement(statementKindAssign(PLACE, RVAL), _SPAN)) => - RVAL ~> #assign(PLACE) + #setLocalValue(PLACE, RVAL) ... // RVAL evaluation is implemented in rt/data.md - syntax KItem ::= #assign ( Place ) - - rule VAL:TypedLocal ~> #assign(PLACE) ~> CONT - => - VAL ~> #setLocalValue(PLACE) ~> CONT - - rule #execStmt(statement(statementKindSetDiscriminant(_PLACE, _VARIDX), _SPAN)) => .K // FIXME! write variant index to PLACE @@ -359,10 +352,9 @@ function call, pushing a new stack frame and returning to a different block after the call returns. ```k - rule #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) + rule #execTerminator(terminator(terminatorKindGoto(I), _SPAN)) ~> _CONT => #execBlockIdx(I) - ... // FIXME: We assume this is empty. Explicitly throw away or check that it is? ``` @@ -370,31 +362,31 @@ A `SwitchInt` terminator selects one of the blocks given as _targets_, depending on the value of a _discriminant_. ```k + syntax KItem ::= #selectBlock ( SwitchTargets , Evaluation ) [strict(2)] + rule #execTerminator(terminator(terminatorKindSwitchInt(DISCR, TARGETS), _SPAN)) ~> _CONT => - #readOperand(DISCR) ~> #selectBlock(TARGETS) + #selectBlock(TARGETS, DISCR) - rule typedLocal(Integer(I, _, _), _, _) ~> #selectBlock(TARGETS) + rule #selectBlock(TARGETS, typedValue(Integer(I, _, _), _, _)) => #execBlockIdx(#selectBlock(I, TARGETS)) ... - rule typedLocal(BoolVal(false), _, _) ~> #selectBlock(TARGETS) + rule #selectBlock(TARGETS, typedValue(BoolVal(false), _, _)) => #execBlockIdx(#selectBlock(0, TARGETS)) ... - rule typedLocal(BoolVal(true), _, _) ~> #selectBlock(TARGETS) + rule #selectBlock(TARGETS, typedValue(BoolVal(true), _, _)) => #execBlockIdx(#selectBlock(1, TARGETS)) ... - syntax KItem ::= #selectBlock ( SwitchTargets ) - syntax BasicBlockIdx ::= #selectBlock ( Int , SwitchTargets) [function, total] | #selectBlockAux ( Int, Branches, BasicBlockIdx ) [function, total] @@ -423,10 +415,12 @@ context of the enclosing stack frame, at the _target_. If the returned value is a `Reference`, its stack height must be decremented because a stack frame is popped. NB that a stack height of `0` cannot occur here, because the compiler prevents local variable references from escaping. +If the loval `_0` does not have a value (i.e., it remained uninitialised), the function returns unit and writing the value is skipped. + ```k rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ => - #decrementRef(LOCAL0) ~> #setLocalValue(DEST) ~> #execBlockIdx(TARGET) ~> .K + #setLocalValue(DEST, #decrementRef(LOCAL0)) ~> #execBlockIdx(TARGET) _ => CALLER // @@ -435,14 +429,33 @@ NB that a stack height of `0` cannot occur here, because the compiler prevents l DEST => NEWDEST someBasicBlockIdx(TARGET) => NEWTARGET _ => UNWIND - ListItem(LOCAL0:TypedLocal) _ => NEWLOCALS + ListItem(LOCAL0:TypedValue) _ => NEWLOCALS // // remaining call stack (without top frame) ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK FUNCS requires CALLER in_keys(FUNCS) - // andBool DEST #within(LOCALS) - [preserves-definedness] // CALLER lookup defined, DEST within locals TODO + [preserves-definedness] // CALLER lookup defined + + // no value to return, skip writing + rule #execTerminator(terminator(terminatorKindReturn, _SPAN)) ~> _ + => + #execBlockIdx(TARGET) + + _ => CALLER + // + _ => #getBlocks(FUNCS, CALLER) + CALLER => NEWCALLER + _ => NEWDEST + someBasicBlockIdx(TARGET) => NEWTARGET + _ => UNWIND + ListItem(_:NewLocal) _ => NEWLOCALS + // + // remaining call stack (without top frame) + ListItem(StackFrame(NEWCALLER, NEWDEST, NEWTARGET, UNWIND, NEWLOCALS)) STACK => STACK + FUNCS + requires CALLER in_keys(FUNCS) + [preserves-definedness] // CALLER lookup defined syntax List ::= #getBlocks(Map, Ty) [function] | #getBlocksAux(MonoItemKind) [function, total] @@ -450,11 +463,10 @@ NB that a stack height of `0` cannot occur here, because the compiler prevents l rule #getBlocks(FUNCS, ID) => #getBlocksAux({FUNCS[ID]}:>MonoItemKind) requires ID in_keys(FUNCS) - // returns blocks from the _first_ body if there are several - // TODO handle cases with several blocks - rule #getBlocksAux(monoItemFn(_, _, .Bodies)) => .List - rule #getBlocksAux(monoItemFn(_, _, body(BLOCKS, _, _, _, _, _) _)) => toKList(BLOCKS) - // other item kinds are not expected or supported + // returns blocks from the body + rule #getBlocksAux(monoItemFn(_, _, noBody)) => .List + rule #getBlocksAux(monoItemFn(_, _, someBody(body(BLOCKS, _, _, _, _, _)))) => toKList(BLOCKS) + // other item kinds are not expected or supported FIXME: Just getting stuck for now rule #getBlocksAux(monoItemStatic(_, _, _)) => .List // should not occur in calls at all rule #getBlocksAux(monoItemGlobalAsm(_)) => .List // not supported. FIXME Should error, maybe during #init ``` @@ -475,7 +487,7 @@ The call stack is not necessarily empty at this point so it is left untouched. _ => return(VAL) noBasicBlockIdx - ListItem(typedLocal(VAL, _, _)) ... + ListItem(typedValue(VAL, _, _)) ... ... @@ -486,7 +498,7 @@ The call stack is not necessarily empty at this point so it is left untouched. noBasicBlockIdx - ListItem(noValue(_, _)) ... + ListItem(newLocal(_, _)) ... ... ``` @@ -497,10 +509,9 @@ where the returned result should go. ```k - rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) + rule #execTerminator(terminator(terminatorKindCall(FUNC, ARGS, DEST, TARGET, UNWIND), _SPAN)) ~> _ => #setUpCalleeData({FUNCTIONS[#tyOfCall(FUNC)]}:>MonoItemKind, ARGS) - ... CALLER => #tyOfCall(FUNC) @@ -533,7 +544,7 @@ An operand may be a `Reference` (the only way a function could access another fu // reserve space for local variables and copy/move arguments from old locals into their place rule #setUpCalleeData( - monoItemFn(_, _, body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _) _:Bodies), + monoItemFn(_, _, someBody(body((FIRST:BasicBlock _) #as BLOCKS, NEWLOCALS, _, _, _, _))), ARGS ) => @@ -551,6 +562,7 @@ An operand may be a `Reference` (the only way a function could access another fu // assumption: arguments stored as _1 .. _n before actual "local" data ... + // TODO: Haven't handled "noBody" case syntax KItem ::= #setArgsFromStack ( Int, Operands) | #setArgFromStack ( Int, Operand) @@ -566,13 +578,13 @@ An operand may be a `Reference` (the only way a function could access another fu rule #setArgFromStack(IDX, operandConstant(_) #as CONSTOPERAND) => - #readOperand(CONSTOPERAND) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #setLocalValue(place(local(IDX), .ProjectionElems), CONSTOPERAND) ... rule #setArgFromStack(IDX, operandCopy(place(local(I), .ProjectionElems))) => - #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef({CALLERLOCALS[I]}:>TypedLocal)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS)) _:List @@ -584,7 +596,7 @@ An operand may be a `Reference` (the only way a function could access another fu rule #setArgFromStack(IDX, operandMove(place(local(I), .ProjectionElems))) => - #incrementRef({CALLERLOCALS[I]}:>TypedLocal) ~> #setLocalValue(place(local(IDX), .ProjectionElems)) + #setLocalValue(place(local(IDX), .ProjectionElems), #incrementRef({CALLERLOCALS[I]}:>TypedLocal)) ... ListItem(StackFrame(_, _, _, _, CALLERLOCALS => CALLERLOCALS[I <- Moved])) _:List @@ -597,25 +609,39 @@ An operand may be a `Reference` (the only way a function could access another fu ``` The `Assert` terminator checks that an operand holding a boolean value (which has previously been computed, e.g., an overflow flag for arithmetic operations) has the expected value (e.g., that this overflow flag is `false` - a very common case). If the condition value is as expected, the program proceeds with the given `target` block. -Otherwise the provided message is passed to a `panic!` call, ending the program with an error, modelled as an `#AssertError` in the semantics. +Otherwise the provided message is passed to a `panic!` call, ending the program with an error, modelled as an `AssertError` in the semantics. ```k - syntax KItem ::= #AssertError ( AssertMessage ) + syntax MIRError ::= AssertError ( AssertMessage ) rule #execTerminator(terminator(assert(COND, EXPECTED, MSG, TARGET, _UNWIND), _SPAN)) ~> _CONT => - #readOperand(COND) ~> #expect(EXPECTED, MSG) ~> #execBlockIdx(TARGET) + #expect(COND, EXPECTED, MSG) ~> #execBlockIdx(TARGET) - syntax KItem ::= #expect ( Bool, AssertMessage ) + syntax KItem ::= #expect ( Evaluation, Bool, AssertMessage ) [strict(1)] - rule typedLocal(BoolVal(COND), _, _) ~> #expect(EXPECTED, _MSG) => .K ... + rule #expect(typedValue(BoolVal(COND), _, _), EXPECTED, _MSG) => .K ... requires COND ==Bool EXPECTED - rule typedLocal(BoolVal(COND), _, _) ~> #expect(EXPECTED, MSG) => #AssertError(MSG) ... + rule #expect(typedValue(BoolVal(COND), _, _), EXPECTED, MSG) => AssertError(MSG) ... requires COND =/=Bool EXPECTED ``` +### Stopping on Program Errors + +The semantics has a dedicated error sort to stop execution when flawed input or undefined behaviour is detected. +This includes cases of invalid MIR (e.g., accessing non-existing locals in a block or jumping to non-existing blocks), mutation of immutable values, or accessing uninitialised locals, but also user errors such as division by zero or overflowing unchecked arithmetic operations. + +The execution will stop with the respective error information as soon as an error condition is detected. + +```k + syntax KItem ::= #ProgramError ( MIRError ) + + rule [program-error]: + ERR:MIRError => #ProgramError(ERR) ... +``` + ```k endmodule ``` diff --git a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md index 95b98e85d..ffe5e10ac 100644 --- a/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md +++ b/kmir/src/kmir/kdist/mir-semantics/lemmas/kmir-lemmas.md @@ -48,10 +48,8 @@ Therefore, its value range should be simplified for symbolic input asserted to b requires VAL true - rule hasValue(Moved) => false - rule hasValue(noValue(_, _)) => false - - rule isNoValue(typedLocal(_, _, _)) => false - rule isNoValue(Moved) => false - rule isNoValue(noValue(_, _)) => true - syntax MaybeTy ::= tyOfLocal ( TypedLocal ) [function, total] - rule tyOfLocal(typedLocal(_, TY, _)) => TY + // ---------------------------------------------------------- + rule tyOfLocal(typedValue(_, TY, _)) => TY rule tyOfLocal(Moved) => TyUnknown - rule tyOfLocal(noValue(TY, _)) => TY - - syntax Bool ::= isMutable ( TypedLocal ) [function, total] - rule isMutable(typedLocal(_, _, mutabilityMut)) => true - rule isMutable(typedLocal(_, _, mutabilityNot)) => false - rule isMutable(Moved) => false - rule isMutable(noValue(_, mutabilityMut)) => true - rule isMutable(noValue(_, mutabilityNot)) => false + rule tyOfLocal(newLocal(TY, _)) => TY + + syntax Mutability ::= mutabilityOf ( TypedLocal ) [function, total] + // ---------------------------------------------------------------- + rule mutabilityOf(typedValue(_, _, MUT)) => MUT + rule mutabilityOf(Moved) => mutabilityNot + rule mutabilityOf(newLocal(_, MUT)) => MUT ``` -Access to a `TypedLocal` (whether reading or writing( may fail for a number of reasons. -Every access is modelled as a _function_ whose result needs to be checked by the caller. +Access to a `TypedLocal` (whether reading or writing) may fail for a number of reasons. +It is an error to use a `Moved` local in any way, or to read an uninitialised `NewLocal`. +Also, locals are accessed via their index in list `` in a stack frame, which may be out of bounds. +Types are also checked, using the `Ty` (an opaque number assigned by the Stable MIR extraction). ```k syntax LocalAccessError ::= InvalidLocal ( Local ) - | TypeMismatch( Local, MaybeTy, TypedLocal ) + | TypeMismatch( Local, MaybeTy, TypedValue ) | LocalMoved( Local ) | LocalNotMutable ( Local ) - | "Uninitialised" - | "NoValueToWrite" - | "ValueMoved" - | Unsupported ( String ) // draft code + | LocalUninitialised( Local ) - syntax KItem ::= #LocalError ( LocalAccessError ) + syntax MIRError ::= LocalAccessError endmodule ``` @@ -98,10 +93,22 @@ module RT-DATA imports KMIR-CONFIGURATION ``` +### Evaluating Items to `TypedValue` or `TypedLocal` + +Some built-in operations (`RValue` or type casts) use constructs that will evaluate to a value of sort `TypedValue`. +The basic operations of reading and writing those values can use K's "heating" and "cooling" rules to describe their evaluation. +Other uses of heating and cooling are to _read_ local variables as operands. This may include `Moved` locals or uninitialised `NewLocal`s (as error cases). Therefore we use the supersort `TypedLocal` of `TypedValue` as the `Result` sort. + +```k + syntax Evaluation ::= TypedLocal // other sorts are added at the first use site + + syntax KResult ::= TypedLocal +``` + ### Reading operands (local variables and constants) ```k - syntax KItem ::= #readOperand ( Operand ) + syntax Evaluation ::= Operand ``` _Read_ access to `Operand`s (which may be local values) may have similar errors as write access. @@ -109,9 +116,9 @@ _Read_ access to `Operand`s (which may be local values) may have similar errors Constant operands are simply decoded according to their type. ```k - rule #readOperand(operandConstant(constOperand(_, _, mirConst(KIND, TY, _)))) + rule operandConstant(constOperand(_, _, mirConst(KIND, TY, _))) => - typedLocal(#decodeConstant(KIND, {TYPEMAP[TY]}:>RigidTy), TY, mutabilityNot) + typedValue(#decodeConstant(KIND, {TYPEMAP[TY]}:>RigidTy), TY, mutabilityNot) ... TYPEMAP @@ -128,7 +135,7 @@ Reading a _Copied_ operand means to simply put it in the K sequence. Obviously, local value cannot be read, though, and the value should be initialised. ```k - rule #readOperand(operandCopy(place(local(I), .ProjectionElems))) + rule operandCopy(place(local(I), .ProjectionElems)) => LOCALS[I] ... @@ -136,31 +143,29 @@ local value cannot be read, though, and the value should be initialised. LOCALS requires 0 <=Int I andBool I TypedLocal) + andBool isTypedValue(LOCALS[I]) [preserves-definedness] // valid list indexing checked - rule #readOperand(operandCopy(place(local(I) #as LOCAL, .ProjectionElems))) + rule operandCopy(place(local(I) #as LOCAL, _)) => - #LocalError(LocalMoved(LOCAL)) + LocalMoved(LOCAL) ... LOCALS - requires LOCALS[I] ==K Moved - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandCopy(place(local(I), .ProjectionElems))) + rule operandCopy(place(local(I), _)) => - #LocalError(Uninitialised) + LocalUninitialised(local(I)) ... LOCALS - requires isNoValue({LOCALS[I]}:>TypedLocal) - andBool I #readOperand(operandMove(place(local(I), .ProjectionElems))) + rule operandMove(place(local(I), .ProjectionElems)) => LOCALS[I] ... LOCALS => LOCALS[I <- Moved] - requires hasValue({LOCALS[I]}:>TypedLocal) - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandMove(place(local(I) #as LOCAL, .ProjectionElems))) + rule operandMove(place(local(I) #as LOCAL, _)) => - #LocalError(LocalMoved(LOCAL)) + LocalMoved(LOCAL) ... LOCALS - requires LOCALS[I] ==K Moved - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandMove(place(local(I), .ProjectionElems))) + rule operandMove(place(local(I), _)) => - #LocalError(Uninitialised) + LocalUninitialised(local(I)) ... LOCALS - requires isNoValue({LOCALS[I]}:>TypedLocal) - andBool 0 <=Int I + requires 0 <=Int I andBool I #readOperand(operandCopy(place(local(I), PROJECTIONS))) + rule operandCopy(place(local(I), PROJECTIONS)) => - #readProjection({LOCALS[I]}:>TypedLocal, PROJECTIONS) + #readProjection({LOCALS[I]}:>TypedValue, PROJECTIONS) ... LOCALS requires PROJECTIONS =/=K .ProjectionElems andBool 0 <=Int I andBool I TypedLocal) + andBool isTypedValue(LOCALS[I]) [preserves-definedness] // valid list indexing checked ``` @@ -236,92 +238,89 @@ Related code currently resides in the value-implementing module. ### Setting local variables (including error cases) -The `#setLocalValue` operation writes a `TypedLocal` value preceeding it in the K sequence to a given `Place` within the `List` of local variables currently on top of the stack. This may fail because a local may not be accessible, moved away, or not mutable. +The `#setLocalValue` operation writes a `TypedLocal` value to a given `Place` within the `List` of local variables currently on top of the stack. This may fail because a local may not be accessible, moved away, or not mutable. ```k - syntax KItem ::= #setLocalValue( Place ) + syntax KItem ::= #setLocalValue( Place, Evaluation ) [strict(2)] // error cases first - rule _:TypedLocal ~> #setLocalValue( place(local(I) #as LOCAL, _)) => #LocalError(InvalidLocal(LOCAL)) ... + rule #setLocalValue( place(local(I) #as LOCAL, _), _) => InvalidLocal(LOCAL) ... LOCALS requires size(LOCALS) <=Int I orBool I typedLocal(_, TY, _) #as VAL ~> #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems)) + rule #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems), typedValue(_, TY, _) #as VAL) => - #LocalError(TypeMismatch(LOCAL, tyOfLocal({LOCALS[I]}:>TypedLocal), VAL)) + TypeMismatch(LOCAL, tyOfLocal({LOCALS[I]}:>TypedLocal), VAL) ... LOCALS - requires I TypedLocal) =/=K TY [preserves-definedness] // list index checked before lookup - // setting a local to Moved is an error - rule _:TypedLocal ~> #setLocalValue( place(local(I), _)) + // setting a local which was Moved is an error + rule #setLocalValue( place(local(I), .ProjectionElems), _) => - #LocalError(LocalMoved(local(I))) + LocalMoved(local(I)) ... LOCALS - requires LOCALS[I] ==K Moved + requires 0 <=Int I + andBool I typedLocal(_, _, _) ~> #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems)) + rule #setLocalValue( place(local(I) #as LOCAL, .ProjectionElems), _) => - #LocalError(LocalNotMutable(LOCAL)) + LocalNotMutable(LOCAL) ... LOCALS requires I TypedLocal) // not mutable - andBool notBool isNoValue({LOCALS[I]}:>TypedLocal) // noValue(_, mutabilityNot) is mutable once - - // writing no value is a no-op - rule noValue(_, _) ~> #setLocalValue( _) => .K ... - // FIXME some zero-sized values are not initialised. Otherwise we could use a special value `ZeroSized` here - - // writing a moved value is an error - rule Moved ~> #setLocalValue( _) => #LocalError(ValueMoved) ... + andBool isTypedValue(LOCALS[I]) + andBool mutabilityOf({LOCALS[I]}:>TypedLocal) ==K mutabilityNot // if all is well, write the value - // - rule typedLocal(VAL:Value, TY, _ ) ~> #setLocalValue(place(local(I), .ProjectionElems)) + // mutable local + rule #setLocalValue(place(local(I), .ProjectionElems), typedValue(VAL:Value, TY, _ )) => .K ... - LOCALS => LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)] + + LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)] + requires 0 <=Int I andBool I TypedLocal) ==K mutabilityMut andBool (tyOfLocal({LOCALS[I]}:>TypedLocal) ==K TY orBool TY ==K TyUnknown) // matching or unknown type - andBool isMutable({LOCALS[I]}:>TypedLocal) // mutable [preserves-definedness] // valid list indexing checked // special case for non-mutable uninitialised values: mutable once - rule typedLocal(VAL:Value, TY, _ ) ~> #setLocalValue(place(local(I), .ProjectionElems)) + rule #setLocalValue(place(local(I), .ProjectionElems), typedValue(VAL:Value, TY, _ )) => .K ... - LOCALS => LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityNot)] + + LOCALS => LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityOf({LOCALS[I]}:>TypedLocal))] + requires 0 <=Int I andBool I TypedLocal) ==K TY orBool TY ==K TyUnknown) // matching or unknown type - andBool notBool isMutable({LOCALS[I]}:>TypedLocal) // not mutable but - andBool isNoValue({LOCALS[I]}:>TypedLocal) // not initialised yet [preserves-definedness] // valid list indexing checked ``` ## Evaluation of RValues -The `RValue` sort in MIR represents various operations that produce a value which can be assigned to a `Place`. +The `Rvalue` sort in MIR represents various operations that produce a value which can be assigned to a `Place`. | RValue | Arguments | Action | |----------------|-------------------------------------------------|--------------------------------------| @@ -345,9 +344,11 @@ The `RValue` sort in MIR represents various operations that produce a value whic The most basic ones are simply accessing an operand, either directly or by way of a type cast. ```k - rule rvalueUse(OPERAND) => #readOperand(OPERAND) ... + syntax Evaluation ::= Rvalue - rule rvalueCast(CASTKIND, OPERAND, TY) => #readOperand(OPERAND) ~> #cast(CASTKIND, TY) ... + rule rvalueUse(OPERAND) => OPERAND ... + + rule rvalueCast(CASTKIND, OPERAND, TY) => #cast(OPERAND, CASTKIND, TY) ... ``` A number of unary and binary operations exist, (which are dependent on the operand types). @@ -374,7 +375,7 @@ Tuples and structs are built as `Aggregate` values with a list of argument value rule ARGS:List ~> #mkAggregate(_) => - typedLocal(Aggregate(ARGS), TyUnknown, mutabilityNot) + typedValue(Aggregate(ARGS), TyUnknown, mutabilityNot) // NB ty not determined ^^^^^^^^^ ... @@ -391,11 +392,11 @@ Tuples and structs are built as `Aggregate` values with a list of argument value rule #readOperandsAux(ACC, OP:Operand REST) => - #readOperand(OP) ~> #readOn(ACC, REST) + OP ~> #readOn(ACC, REST) ... - rule VAL:TypedLocal ~> #readOn(ACC, REST) + rule VAL:TypedValue ~> #readOn(ACC, REST) => #readOperandsAux(ACC ListItem(VAL), REST) ... @@ -416,7 +417,7 @@ The `BorrowKind` indicates mutability of the value through the reference, but al ```k rule rvalueRef(_REGION, KIND, PLACE) => - typedLocal(Reference(0, PLACE, #mutabilityOf(KIND)), TyUnknown, #mutabilityOf(KIND)) + typedValue(Reference(0, PLACE, #mutabilityOf(KIND)), TyUnknown, #mutabilityOf(KIND)) ... @@ -442,7 +443,14 @@ cast from a `TypedLocal` to another when it is followed by a `#cast` item, rewriting `typedLocal(...) ~> #cast(...) ~> REST` to `typedLocal(...) ~> REST`. ```k - syntax KItem ::= #cast( CastKind, Ty ) + syntax KItem ::= #cast( Evaluation, CastKind, Ty ) [strict(1)] + + syntax MIRError ::= CastError + + syntax CastError ::= UnknownCastTarget ( Ty , Map ) + | UnexpectedCastTarget ( CastKind, RigidTy ) + | UnexpectedCastArgument ( TypedLocal, CastKind ) + | CastNotimplemented ( CastKind ) endmodule ``` @@ -486,8 +494,6 @@ High-level values can be - references to a place in the current or an enclosing stack frame - arrays and slices (with homogenous element types) -**This sort is work in progress and will be extended and modified as we go** - ```k module RT-DATA-HIGH-SYNTAX imports RT-DATA-SYNTAX @@ -608,9 +614,10 @@ bit width, signedness, and possibly truncating or 2s-complementing the value. ```k // int casts - rule typedLocal(Integer(VAL, WIDTH, _SIGNEDNESS), _, MUT) ~> #cast(castKindIntToInt, TY) ~> CONT + rule #cast(typedValue(Integer(VAL, WIDTH, _SIGNEDNESS), _, MUT), castKindIntToInt, TY) => - typedLocal(#intAsType(VAL, WIDTH, #numTypeOf({TYPEMAP[TY]}:>RigidTy)), TY, MUT) ~> CONT + typedValue(#intAsType(VAL, WIDTH, #numTypeOf({TYPEMAP[TY]}:>RigidTy)), TY, MUT) + ... TYPEMAP requires #isIntType({TYPEMAP[TY]}:>RigidTy) @@ -664,7 +671,7 @@ bit width, signedness, and possibly truncating or 2s-complementing the value. requires #bitWidth(INTTYPE) <=Int WIDTH [preserves-definedness] // positive shift, divisor non-zero - // widening: nothing to do: VAL does change (enough bits to represent, no sign change possible) + // widening: nothing to do: VAL does not change (enough bits to represent, no sign change possible) rule #intAsType(VAL, WIDTH, INTTYPE:IntTy) => Integer(VAL, #bitWidth(INTTYPE), true) @@ -691,67 +698,53 @@ Error cases for `castKindIntToInt` * value is not a `Integer` ```k - rule (_:TypedLocal ~> #cast(castKindIntToInt, TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Int-to-Int type cast to unknown type")) ~> STUFF - - TYPEMAP - + rule #cast(_, castKindIntToInt, TY) => UnknownCastTarget(TY, TYPEMAP) ... + TYPEMAP requires notBool isRigidTy(TYPEMAP[TY]) - rule (_:TypedLocal ~> #cast(castKindIntToInt, TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Int-to-Int type cast to unexpected non-int type")) ~> STUFF - - TYPEMAP + rule #cast(_, castKindIntToInt, TY) => UnexpectedCastTarget(castKindIntToInt, {TYPEMAP[TY]}:>RigidTy) ... + TYPEMAP requires notBool (#isIntType({TYPEMAP[TY]}:>RigidTy)) - rule (_:TypedLocal ~> #cast(castKindIntToInt, _TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Int-to-Int type cast of non-int value")) ~> STUFF - + rule #cast(NONINT, castKindIntToInt, _TY) => UnexpectedCastArgument(NONINT, castKindIntToInt) ... [owise] ``` - -**TODO** Other type casts are not implemented. +Other type casts are not implemented yet. ```k - rule (_:TypedLocal ~> #cast(CASTKIND, _TY) ~> _CONT) #as STUFF - => - #LocalError(Unsupported("Type casts not implemented")) ~> STUFF - + rule #cast(_, CASTKIND, _TY) => CastNotimplemented(CASTKIND)... requires CASTKIND =/=K castKindIntToInt [owise] ``` ### Projections on `TypedLocal` values -The implementation of projections (a list `ProjectionElems`) accesses the structure of a stored value and therefore depends on the value representation. Function `#readProjection ( TypedLocal , Projectionelems) -> TypedLocal` is therefore implemented in the more specific module that provides a `Value` implementation. +The implementation of projections (a list `ProjectionElems`) accesses the structure of a stored value and therefore depends on the value representation. Function `#readProjection ( TypedValue , Projectionelems) -> TypedLocal` is therefore implemented in the more specific module that provides a `Value` implementation. #### Reading data from places with projections The `ProjectionElems` list contains a sequence of projections which is applied (left-to-right) to the value in a `TypedLocal` to obtain a derived value or component thereof. The `TypedLocal` argument is there for the purpose of recursion over the projections. We don't expect the operation to apply to an empty projection `.ProjectionElems`, the base case exists for the recursion. ```k - // syntax KItem ::= #readProjection ( TypedLocal , ProjectionElems ) - rule #readProjection(TL, .ProjectionElems) => TL ... + // syntax KItem ::= #readProjection ( TypedValue , ProjectionElems ) + rule #readProjection(VAL, .ProjectionElems) => VAL ... ``` A `Field` access projection operates on `struct`s and tuples, which are represented as `Aggregate` values. The field is numbered from zero (in source order), and the field type is provided (not checked here). ```k rule #readProjection( - typedLocal(Aggregate(ARGS), _, _), + typedValue(Aggregate(ARGS), _, _), projectionElemField(fieldIdx(I), _TY) PROJS ) => - #readProjection({ARGS[I]}:>TypedLocal, PROJS) + #readProjection({ARGS[I]}:>TypedValue, PROJS) ... requires 0 <=Int I andBool I #readProjection( - typedLocal(Reference(0, place(local(I:Int), PLACEPROJS:ProjectionElems), _), _, _), + typedValue(Reference(0, place(local(I:Int), PLACEPROJS:ProjectionElems), _), _, _), projectionElemDeref PROJS:ProjectionElems ) => - #readProjection({LOCALS[I]}:>TypedLocal, appendP(PLACEPROJS, PROJS)) + #readProjection({LOCALS[I]}:>TypedValue, appendP(PLACEPROJS, PROJS)) ... LOCALS requires 0 TAIL @@ -786,19 +781,25 @@ An important prerequisite of this rule is that when passing references to a call ```k rule #readProjection( - typedLocal(Reference(FRAME, place(LOCAL:Local, PLACEPROJS), _), _, _), + typedValue(Reference(FRAME, place(LOCAL:Local, PLACEPROJS), _), _, _), projectionElemDeref PROJS ) => - #readProjection(#localFromFrame({STACK[FRAME -Int 1]}:>StackFrame, LOCAL, FRAME), appendP(PLACEPROJS, PROJS)) + #readProjection( + {#localFromFrame({STACK[FRAME -Int 1]}:>StackFrame, LOCAL, FRAME)}:>TypedValue, + appendP(PLACEPROJS, PROJS) + ) ... STACK requires 0 StackFrame, LOCAL, FRAME)) [preserves-definedness] // valid list indexing checked + // TODO case of MovedLocal and NewLocal + syntax TypedLocal ::= #localFromFrame ( StackFrame, Local, Int ) [function] rule #localFromFrame(StackFrame(... locals: LOCALS), local(I:Int), OFFSET) => #adjustRef({LOCALS[I]}:>TypedLocal, OFFSET) @@ -811,8 +812,8 @@ An important prerequisite of this rule is that when passing references to a call | #decrementRef ( TypedLocal ) [function, total] | #adjustRef (TypedLocal, Int ) [function, total] - rule #adjustRef(typedLocal(Reference(HEIGHT, PLACE, REFMUT), TY, MUT), OFFSET) - => typedLocal(Reference(HEIGHT +Int OFFSET, PLACE, REFMUT), TY, MUT) + rule #adjustRef(typedValue(Reference(HEIGHT, PLACE, REFMUT), TY, MUT), OFFSET) + => typedValue(Reference(HEIGHT +Int OFFSET, PLACE, REFMUT), TY, MUT) rule #adjustRef(TL, _) => TL [owise] rule #incrementRef(TL) => #adjustRef(TL, 1) @@ -840,13 +841,15 @@ The solution is to use rewrite operations in a downward pass through the project syntax Contexts ::= List{Context, ""} rule #buildUpdate(VAL, .Contexts) => VAL + [preserves-definedness] rule #buildUpdate(VAL, CtxField(TY, ARGS, I) CTXS) - => #buildUpdate(typedLocal(Aggregate(ARGS[I <- VAL]), TY, mutabilityMut), CTXS) + => #buildUpdate(typedValue(Aggregate(ARGS[I <- VAL]), TY, mutabilityMut), CTXS) + [preserves-definedness] // valid list indexing checked upon context construction rule #projectedUpdate( DEST, - typedLocal(Aggregate(ARGS), TY, MUT), + typedValue(Aggregate(ARGS), TY, MUT), projectionElemField(fieldIdx(I), _) PROJS, UPDATE, CTXTS, @@ -859,11 +862,11 @@ The solution is to use rewrite operations in a downward pass through the project andBool I #projectedUpdate( _DEST, - typedLocal(Reference(OFFSET, place(LOCAL, PLACEPROJ), MUT), _, _), + typedValue(Reference(OFFSET, place(LOCAL, PLACEPROJ), MUT), _, _), projectionElemDeref PROJS, UPDATE, _CTXTS, @@ -889,7 +892,7 @@ The solution is to use rewrite operations in a downward pass through the project rule #projectedUpdate( _DEST, - typedLocal(Reference(OFFSET, place(local(I), PLACEPROJ), MUT), _, _), + typedValue(Reference(OFFSET, place(local(I), PLACEPROJ), MUT), _, _), projectionElemDeref PROJS, UPDATE, _CTXTS, @@ -915,20 +918,22 @@ The solution is to use rewrite operations in a downward pass through the project rule #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, false) => - #buildUpdate(NEW, CONTEXTS) ~> #setLocalValue(place(local(I), .ProjectionElems)) + #setLocalValue(place(local(I), .ProjectionElems), #buildUpdate(NEW, CONTEXTS)) ... + [preserves-definedness] // valid conmtext ensured upon context construction rule #projectedUpdate(toLocal(I), _ORIGINAL, .ProjectionElems, NEW, CONTEXTS, true) => - #buildUpdate(NEW, CONTEXTS) ~> #forceSetLocal(local(I)) + #forceSetLocal(local(I), #buildUpdate(NEW, CONTEXTS)) ... + [preserves-definedness] // valid conmtext ensured upon context construction - syntax KItem ::= #forceSetLocal ( Local ) + syntax KItem ::= #forceSetLocal ( Local , TypedLocal ) // #forceSetLocal sets the given value unconditionally (to write Moved values) - rule VALUE:TypedLocal ~> #forceSetLocal(local(I)) + rule #forceSetLocal(local(I), VALUE) => .K ... @@ -957,8 +962,8 @@ The solution is to use rewrite operations in a downward pass through the project andBool I StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedLocal(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)]) + rule #updateStackLocal(StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS), I, typedValue(VAL, _, _)) + => StackFrame(CALLER, DEST, TARGET, UNWIND, LOCALS[I <- typedValue(VAL, tyOfLocal({LOCALS[I]}:>TypedLocal), mutabilityMut)]) requires 0 <=Int I andBool I VAL ~> #setLocalValue(place(local(I), PROJ)) + rule #setLocalValue(place(local(I), PROJ), VAL) => #projectedUpdate(toLocal(I), {LOCALS[I]}:>TypedLocal, PROJ, VAL, .Contexts, false) ... @@ -980,7 +985,7 @@ We could first read the original value using `#readProjection` and compare the t requires 0 <=Int I andBool I #readOperand(operandMove(place(local(I) #as LOCAL, PROJECTIONS))) + rule operandMove(place(local(I) #as LOCAL, PROJECTIONS)) => // read first, then write moved marker (use type from before) - #readProjection({LOCALS[I]}:>TypedLocal, PROJECTIONS) ~> + #readProjection({LOCALS[I]}:>TypedValue, PROJECTIONS) ~> #markMoved({LOCALS[I]}:>TypedLocal, LOCAL, PROJECTIONS) ... @@ -1000,9 +1005,11 @@ Reading `Moved` operands requires a write operation to the read place, too, howe requires PROJECTIONS =/=K .ProjectionElems andBool 0 <=Int I andBool I VAL:TypedLocal ~> #markMoved(OLDLOCAL, local(I), PROJECTIONS) ~> CONT @@ -1027,51 +1034,25 @@ This is specific to Stable MIR, the MIR AST instead uses `WithOverflow` as t For binary operations generally, both arguments have to be read from the provided operands, followed by checking the types and then performing the actual operation (both implemented in `#compute`), which can return a `TypedLocal` or an error. A flag carries the information whether to perform an overflow check through to this function for `CheckedBinaryOp`. ```k - syntax KItem ::= #suspend ( BinOp, Operand, Bool) - | #ready ( BinOp, TypedLocal, Bool ) - | #compute ( BinOp, TypedLocal, TypedLocal, Bool ) [function, total] - - rule rvalueBinaryOp(BINOP, OP1, OP2) - => - #readOperand(OP1) ~> #suspend(BINOP, OP2, false) - ... - + syntax KItem ::= #compute ( BinOp, Evaluation, Evaluation, Bool) [seqstrict(2,3)] - rule rvalueCheckedBinaryOp(BINOP, OP1, OP2) - => - #readOperand(OP1) ~> #suspend(BINOP, OP2, true) - ... - + rule rvalueBinaryOp(BINOP, OP1, OP2) => #compute(BINOP, OP1, OP2, false) ... - rule ARG1:TypedLocal ~> #suspend(BINOP, OP2, CHECKFLAG) - => - #readOperand(OP2) ~> #ready(BINOP, ARG1, CHECKFLAG) - ... - - - rule ARG2:TypedLocal ~> #ready(BINOP, ARG1,CHECKFLAG) - => - #compute(BINOP, ARG1, ARG2, CHECKFLAG) - ... - + rule rvalueCheckedBinaryOp(BINOP, OP1, OP2) => #compute(BINOP, OP1, OP2, true) ... ``` There are also a few _unary_ operations (`UnOpNot`, `UnOpNeg`, `UnOpPtrMetadata`) used in `RValue:UnaryOp`. These operations only read a single operand and do not need a `#suspend` helper. ```k - syntax KItem ::= #applyUnOp ( UnOp ) + syntax KItem ::= #applyUnOp ( UnOp , Evaluation ) [strict(2)] - rule rvalueUnaryOp(UNOP, OP1) - => - #readOperand(OP1) ~> #applyUnOp(UNOP) - ... - + rule rvalueUnaryOp(UNOP, OP1) => #applyUnOp(UNOP, OP1) ... ``` #### Potential errors ```k - syntax KItem ::= #OperationError( OperationError ) + syntax MIRError ::= OperationError syntax OperationError ::= TypeMismatch ( BinOp, Ty, Ty ) | OperandMismatch ( BinOp, Value, Value ) @@ -1079,19 +1060,22 @@ There are also a few _unary_ operations (`UnOpNot`, `UnOpNeg`, `UnOpPtrMetadata` | OperandMismatch ( UnOp, Value ) | OperandError( UnOp, TypedLocal) // errors above are compiler bugs or invalid MIR - | Unimplemented ( BinOp, TypedLocal, TypedLocal) + | OpNotimplemented ( BinOp, TypedValue, TypedValue) // errors below are program errors | "DivisionByZero" - | "Overflow_U_B" // better than getting stuck + | "Overflow_U_B" + + // catch Moved or uninitialised operands + rule #compute(OP, ARG1, ARG2, _FLAG) => OperandError(OP, ARG1, ARG2) + requires notBool (isTypedValue(ARG1) andBool isTypedValue(ARG2)) - // catch pathological cases where ARG1 or ARG2, or both, are Moved or NoValue. - rule #compute(OP, ARG1, ARG2, _FLAG) => #OperationError(OperandError(OP, ARG1, ARG2)) - requires notBool (hasValue(ARG1) andBool hasValue(ARG2)) + rule #applyUnOp(OP, ARG) => OperandError(OP, ARG) + requires notBool isTypedValue(ARG) // catch-all rule to make `#compute` total - rule #compute(OP, ARG1, ARG2, _FLAG) - => - #OperationError(Unimplemented(OP, ARG1, ARG2)) + rule #compute(OP, ARG1, ARG2, _FLAG) => OpNotimplemented(OP, ARG1, ARG2) + requires isTypedValue(ARG1) + andBool isTypedValue(ARG2) [owise] ``` @@ -1138,75 +1122,22 @@ The arithmetic operations require operands of the same numeric type. requires Y =/=Int 0 // operation undefined otherwise + // Checked operations return a pair of the truncated value and an overflow flag + // signed numbers: must check for wrap-around (operation specific) rule #compute( BOP, - typedLocal(Integer(ARG1, WIDTH, SIGNEDNESS), TY, _), - typedLocal(Integer(ARG2, WIDTH, SIGNEDNESS), TY, _), - CHK) + typedValue(Integer(ARG1, WIDTH, true), TY, _), //signed + typedValue(Integer(ARG2, WIDTH, true), TY, _), + true) // checked => - #arithmeticInt(BOP, ARG1, ARG2, WIDTH, SIGNEDNESS, TY, CHK) - requires isArithmetic(BOP) - [preserves-definedness] - - // error cases: - // non-scalar arguments - rule #compute(BOP, typedLocal(ARG1, TY, _), typedLocal(ARG2, TY, _), _) - => - #OperationError(OperandMismatch(BOP, ARG1, ARG2)) - requires isArithmetic(BOP) - [owise] - - // different argument types - rule #compute(BOP, typedLocal(_, TY1, _), typedLocal(_, TY2, _), _) - => - #OperationError(TypeMismatch(BOP, TY1, TY2)) - requires TY1 =/=K TY2 - andBool isArithmetic(BOP) - [owise] - - // helper function to truncate int values - syntax Int ::= truncate(Int, Int, Signedness) [function, total] - // ------------------------------------------------------------- - // unsigned values can be truncated using a simple bitmask - // NB if VAL is negative (underflow), the truncation will yield a positive number - rule truncate(VAL, WIDTH, Unsigned) - => // mask with relevant bits - VAL &Int ((1 < VAL // shortcut when there is nothing to do - requires 0 // bit-based truncation, then establishing the sign by subtracting a bias - (VAL &Int ((1 <=Int (1 < - typedLocal( + typedValue( Aggregate( - ListItem(typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot)) + ListItem(typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot)) ListItem( - typedLocal( + typedValue( BoolVal( - // overflow: Result outside valid range - (1 < - typedLocal( + typedValue( Aggregate( - ListItem(typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot)) + ListItem(typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot)) ListItem( - typedLocal( + typedValue( BoolVal( - // overflow flag: true if infinite precision result is not equal to truncated result + // overflow flag: compare to truncated result truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned) =/=Int onInt(BOP, ARG1, ARG2) ), TyUnknown, @@ -1243,53 +1177,125 @@ The arithmetic operations require operands of the same numeric type. requires isArithmetic(BOP) [preserves-definedness] - // performing unchecked operations may result in undefined behaviour, which we signal. - // The check it the same as the one for the overflow flag above + // Unchecked operations signal undefined behaviour on overflow. The checks are the same as for the flags above. - rule #arithmeticInt(BOP, ARG1, ARG2, WIDTH, true, TY, false) - => typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + rule #compute( + BOP, + typedValue(Integer(ARG1, WIDTH, true), TY, _), // signed + typedValue(Integer(ARG2, WIDTH, true), TY, _), + false) // unchecked + => typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed), WIDTH, true), TY, mutabilityNot) requires isArithmetic(BOP) // infinite precision result must equal truncated result andBool truncate(onInt(BOP, ARG1, ARG2), WIDTH, Signed) ==Int onInt(BOP, ARG1, ARG2) [preserves-definedness] // unsigned numbers: simple overflow check using a bit mask - rule #arithmeticInt(BOP, ARG1, ARG2, WIDTH, false, TY, false) - => typedLocal(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) + rule #compute( + BOP, + typedValue(Integer(ARG1, WIDTH, false), TY, _), // unsigned + typedValue(Integer(ARG2, WIDTH, false), TY, _), + false) // unchecked + => typedValue(Integer(truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) requires isArithmetic(BOP) // infinite precision result must equal truncated result andBool truncate(onInt(BOP, ARG1, ARG2), WIDTH, Unsigned) ==Int onInt(BOP, ARG1, ARG2) [preserves-definedness] - rule #arithmeticInt(BOP, _, _, _, _, _, false) => #OperationError(Overflow_U_B) + // lower-priority rule to catch undefined behaviour + rule #compute( + BOP, + typedValue(Integer(_, WIDTH, SIGNEDNESS), TY, _), + typedValue(Integer(_, WIDTH, SIGNEDNESS), TY, _), + false) // unchecked + => Overflow_U_B requires isArithmetic(BOP) - [owise] + [priority(60)] // These are additional high priority rules to detect/report divbyzero and div/rem overflow/underflow // (the latter can only happen for signed Ints with dividend minInt and divisor -1 - rule #arithmeticInt(binOpDiv, _, DIVISOR, _, _, _, _) + rule #compute(binOpDiv, _, typedValue(Integer(DIVISOR, _, _), _, _), _) => - #OperationError(DivisionByZero) + DivisionByZero requires DIVISOR ==Int 0 [priority(40)] - rule #arithmeticInt(binOpRem, _, DIVISOR, _, _, _, _) + + rule #compute(binOpRem, _, typedValue(Integer(DIVISOR, _, _), _, _), _) => - #OperationError(DivisionByZero) + DivisionByZero requires DIVISOR ==Int 0 [priority(40)] - rule #arithmeticInt(binOpDiv, DIVIDEND, DIVISOR, WIDTH, true, _, _) + rule #compute( + binOpDiv, + typedValue(Integer(DIVIDEND, WIDTH, true), TY, _), // signed + typedValue(Integer(DIVISOR, WIDTH, true), TY, _), + _) => - #OperationError(Overflow_U_B) + Overflow_U_B requires DIVISOR ==Int -1 andBool DIVIDEND ==Int 0 -Int (1 < - #OperationError(Overflow_U_B) + Overflow_U_B requires DIVISOR ==Int -1 andBool DIVIDEND ==Int 0 -Int (1 < + OperandMismatch(BOP, ARG1, ARG2) + requires isArithmetic(BOP) + [owise] + + // different argument types + rule #compute(BOP, typedValue(_, TY1, _), typedValue(_, TY2, _), _) + => + TypeMismatch(BOP, TY1, TY2) + requires TY1 =/=K TY2 + andBool isArithmetic(BOP) + [owise] + + + // helper function to truncate int values + syntax Int ::= truncate(Int, Int, Signedness) [function, total] + // ------------------------------------------------------------- + // unsigned values can be truncated using a simple bitmask + // NB if VAL is negative (underflow), the truncation will yield a positive number + rule truncate(VAL, WIDTH, Unsigned) + => // mask with relevant bits + VAL &Int ((1 < VAL // shortcut when there is nothing to do + requires 0 // if truncated value small enough and positive, all is done + (VAL &Int ((1 < // subtract a bias when the truncation result too large + (VAL &Int ((1 <=Int (1 < cmpOpBool(binOpLe, Y, X) rule cmpOpBool(binOpGt, X, Y) => cmpOpBool(binOpLt, Y, X) - rule #compute(OP, typedLocal(_, TY, _), typedLocal(_, TY2, _), _) => #OperationError(TypeMismatch(OP, TY, TY2)) + rule #compute(OP, typedValue(_, TY, _), typedValue(_, TY2, _), _) => TypeMismatch(OP, TY, TY2) requires isComparison(OP) andBool TY =/=K TY2 - rule #compute(OP, typedLocal(Integer(VAL1, WIDTH, SIGN), TY, _), typedLocal(Integer(VAL2, WIDTH, SIGN), TY, _), _) + rule #compute(OP, typedValue(Integer(VAL1, WIDTH, SIGN), TY, _), typedValue(Integer(VAL2, WIDTH, SIGN), TY, _), _) => - typedLocal(BoolVal(cmpOpInt(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) + typedValue(BoolVal(cmpOpInt(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) requires isComparison(OP) + [preserves-definedness] // OP known to be a comparison - rule #compute(OP, typedLocal(BoolVal(VAL1), TY, _), typedLocal(BoolVal(VAL2), TY, _), _) + rule #compute(OP, typedValue(BoolVal(VAL1), TY, _), typedValue(BoolVal(VAL2), TY, _), _) => - typedLocal(BoolVal(cmpOpBool(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) + typedValue(BoolVal(cmpOpBool(OP, VAL1, VAL2)), TyUnknown, mutabilityNot) requires isComparison(OP) + [preserves-definedness] // OP known to be a comparison - rule #compute(OP, typedLocal(ARG1, TY, _), typedLocal(ARG2, TY, _), _) + rule #compute(OP, typedValue(ARG1, TY, _), typedValue(ARG2, TY, _), _) => - #OperationError(OperandMismatch(OP, ARG1, ARG2)) + OperandMismatch(OP, ARG1, ARG2) + requires isComparison(OP) [owise] ``` @@ -1358,14 +1367,13 @@ The `binOpCmp` operation returns `-1`, `0`, or `+1` (the behaviour of Rust's `st rule cmpBool(X, Y) => 0 requires X ==Bool Y rule cmpBool(X, Y) => 1 requires X andBool notBool Y - rule #compute(binOpCmp, typedLocal(Integer(VAL1, WIDTH, SIGN), TY, _), typedLocal(Integer(VAL2, WIDTH, SIGN), TY, _), _) + rule #compute(binOpCmp, typedValue(Integer(VAL1, WIDTH, SIGN), TY, _), typedValue(Integer(VAL2, WIDTH, SIGN), TY, _), _) => - typedLocal(Integer(cmpInt(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) + typedValue(Integer(cmpInt(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) - rule #compute(binOpCmp, typedLocal(BoolVal(VAL1), TY, _), typedLocal(BoolVal(VAL2), TY, _), _) + rule #compute(binOpCmp, typedValue(BoolVal(VAL1), TY, _), typedValue(BoolVal(VAL2), TY, _), _) => - typedLocal(Integer(cmpBool(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) - + typedValue(Integer(cmpBool(VAL1, VAL2), 8, true), TyUnknown, mutabilityNot) ``` #### Unary operations on Boolean and integral values @@ -1374,9 +1382,9 @@ The `unOpNeg` operation only works signed integral (and floating point) numbers. An overflow can happen when negating the minimal representable integral value (in the given `WIDTH`). The semantics of the operation in this case is to wrap around (with the given bit width). ```k - rule typedLocal(Integer(VAL, WIDTH, true), TY, _) ~> #applyUnOp(unOpNeg) + rule #applyUnOp(unOpNeg, typedValue(Integer(VAL, WIDTH, true), TY, _)) => - typedLocal(Integer(truncate(0 -Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + typedValue(Integer(truncate(0 -Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) ... @@ -1386,27 +1394,27 @@ An overflow can happen when negating the minimal representable integral value (i The `unOpNot` operation works on boolean and integral values, with the usual semantics for booleans and a bitwise semantics for integral values (overflows cannot occur). ```k - rule typedLocal(BoolVal(VAL), TY, _) ~> #applyUnOp(unOpNot) + rule #applyUnOp(unOpNot, typedValue(BoolVal(VAL), TY, _)) => - typedLocal(BoolVal(notBool VAL), TY, mutabilityNot) + typedValue(BoolVal(notBool VAL), TY, mutabilityNot) ... - rule typedLocal(Integer(VAL, WIDTH, true), TY, _) ~> #applyUnOp(unOpNot) + rule #applyUnOp(unOpNot, typedValue(Integer(VAL, WIDTH, true), TY, _)) => - typedLocal(Integer(truncate(~Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) + typedValue(Integer(truncate(~Int VAL, WIDTH, Signed), WIDTH, true), TY, mutabilityNot) ... - rule typedLocal(Integer(VAL, WIDTH, false), TY, _) ~> #applyUnOp(unOpNot) + rule #applyUnOp(unOpNot, typedValue(Integer(VAL, WIDTH, false), TY, _)) => - typedLocal(Integer(truncate(~Int VAL, WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) + typedValue(Integer(truncate(~Int VAL, WIDTH, Unsigned), WIDTH, false), TY, mutabilityNot) ... ``` ```k - rule typedLocal(VAL, _, _) ~> #applyUnOp(OP) => #OperationError(OperandMismatch(OP, VAL)) ... + rule #applyUnOp(OP, typedValue(VAL, _, _)) => OperandMismatch(OP, VAL) ... [owise] ``` @@ -1428,7 +1436,7 @@ The `unOpNot` operation works on boolean and integral values, with the usual sem One important use case of `UbChecks` is to determine overflows in unchecked arithmetic operations. Since our arithmetic operations signal undefined behaviour on overflow independently, the value returned by `UbChecks` is `false` for now. ```k - rule rvalueNullaryOp(nullOpUbChecks, _) => typedLocal(BoolVal(false), TyUnknown, mutabilityNot) ... + rule rvalueNullaryOp(nullOpUbChecks, _) => typedValue(BoolVal(false), TyUnknown, mutabilityNot) ... ``` #### "Nullary" operations reifying type information diff --git a/kmir/src/kmir/parse/notes.md b/kmir/src/kmir/parse/notes.md index f242edbef..df79d454f 100644 --- a/kmir/src/kmir/parse/notes.md +++ b/kmir/src/kmir/parse/notes.md @@ -36,7 +36,7 @@ json: an array of integer values between 0 and 255 syntax Elems ::= List {Elem, ""} [group(mir-list), ...] ``` json: a homogeneous list, e.g. `[e1, e2, e3, ...]`, where all elements correspond to syntactic productions for the sort `Elem`. -As per naming convention, the list sort `Elems` (plural) should contain elements of sort `Elem` (singular). Usual plural formation rules (`Body -> Bodies`, `Branch -> Branches`) are respected. +As per naming convention, the list sort `Elems` (plural) should contain elements of sort `Elem` (singular). Usual plural formation rules (`Branch -> Branches`) are respected. #### mir-klist-ElementSort ``` diff --git a/kmir/src/kmir/parse/parser.py b/kmir/src/kmir/parse/parser.py index 4050b0714..453a9becd 100644 --- a/kmir/src/kmir/parse/parser.py +++ b/kmir/src/kmir/parse/parser.py @@ -113,7 +113,7 @@ def _list_symbols(sort: str) -> tuple[str, str]: # Given a list Sort, return the element sort. def _element_sort(sort: KSort) -> KSort: name = sort.name - if name.endswith('ies'): # Bodies, Entries, ... + if name.endswith('ies'): # Entries, ... return KSort(name[:-3] + 'y') elif ( # -es for words ending in 's', 'ch', 'sh', 'ss', 'x' or 'z' name.endswith('ses') diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json index 0440b6464..212c5f2aa 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json @@ -1,3678 +1,3652 @@ { - "name": "arithmetic_unchecked_runs", - "crate_id": 13794361957699792544, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 56, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 117, - 98, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 117, - 56, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 97, - 100, - 100, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] + "name": "arithmetic_unchecked_runs", + "crate_id": 13794361957699792544, + "allocs": [ + [ + 3, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 117, + 56, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 97, + 100, + 100, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE" - } - ], - [ - 29, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE" - } - ], - [ - 23, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h3a5ca15c2000251eE" - } - ], - [ - 27, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E" - } - ], - [ + [ + 2, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, 41, - { - "NoOpSym": "" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E" - } - ], - [ - 31, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E" - } - ] + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 56, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 117, + 98, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 31, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start17h665493b8ec74817bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + [ + 38, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE" + } + ], + [ + 23, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h3a5ca15c2000251eE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E" + } + ], + [ + 29, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "Field": [ + 0, + 15 + ] }, { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 13 + ] + } + } } - ] + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - }, - "details": null - }, - { - "symbol_name": "_ZN25arithmetic_unchecked_runs4main17h1bc17631fcb9d7bbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 10, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 101, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - }, - { - "Constant": { - "span": 102, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - } - ] - } - ] - }, - "span": 103 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 101, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - }, - { - "Constant": { - "span": 102, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 14 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 103 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 103 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 104, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 15 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 105, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 16 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 106 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Constant": { - "span": 107, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 17 - } - } - }, - { - "Constant": { - "span": 108, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 18 - } - } - } - ] - } - ] - }, - "span": 109 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Constant": { - "span": 107, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 17 - } - } - }, - { - "Constant": { - "span": 108, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 18 - } - } - } - ] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 109 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 109 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 110, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Constant": { - "span": 111, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 20 - } - } - } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 112 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 114 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 115 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 8, - "projection": [] - } - }, - { - "Copy": { - "local": 9, - "projection": [] - } - } - ] - } - ] - }, - "span": 113 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 10, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Move": { - "local": 9, - "projection": [] - } - } - ] - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 113 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 10, - "projection": [ - { - "Field": [ - 0, - 35 - ] - } - ] - } - } - } - ] - }, - "span": 113 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 35 - ] - } - ] - }, - "span": 117 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 7, - "projection": [] - } - }, - { - "Copy": { - "local": 12, - "projection": [] - } - } - ] - } - ] - }, - "span": 116 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 7, - "projection": [] - } - }, - { - "Move": { - "local": 12, - "projection": [] - } - } - ] - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 116 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 0, - 35 - ] - } - ] - } - } - } - ] - }, - "span": 116 - } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 9, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 97, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 118 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 119, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 120, - "mutability": "Not" - }, - { - "ty": 28, - "span": 103, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 121, - "mutability": "Not" - }, - { - "ty": 2, - "span": 122, - "mutability": "Not" - }, - { - "ty": 26, - "span": 109, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 123, - "mutability": "Not" - }, - { - "ty": 35, - "span": 124, - "mutability": "Not" - }, - { - "ty": 35, - "span": 114, - "mutability": "Mut" - }, - { - "ty": 35, - "span": 115, - "mutability": "Mut" - }, - { - "ty": 36, - "span": 113, - "mutability": "Mut" - }, - { - "ty": 35, - "span": 125, - "mutability": "Not" - }, - { - "ty": 35, - "span": 117, - "mutability": "Mut" - }, - { - "ty": 36, - "span": 116, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 120, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 121, - "scope": 2 + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 122, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 123, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 124, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 7, - "projection": [] - } - }, - "argument_index": null + "align": 1, + "mutability": "Mut" + } }, - { - "name": "f", - "source_info": { - "span": 125, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 11, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 126 + "ty": 17, + "id": 13 + } + } + } } - ] + ] + }, + "span": 97 + } + ], + "terminator": { + "kind": "Return", + "span": 96 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" + } + ], + "locals": [ + { + "ty": 17, + "span": 98, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 99, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 99, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h675110f50b410d54E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 94, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 29, - "id": 11 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 + }, + "ty": 24, + "id": 8 + } + } } - ] + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub18precondition_check17h09d11b33245f51d3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub::precondition_check", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 66, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 25, - "span": 62, - "mutability": "Not" - }, - { - "ty": 2, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 26, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 25, + "span": 62, + "mutability": "Not" + }, + { + "ty": 2, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 26, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] } - ] + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add::precondition_check", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 80 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 81 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 81 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 82 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 84 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 79 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 86, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 66, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 10 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 87 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 88 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 89, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 90, - "mutability": "Not" - }, - { - "ty": 9, - "span": 90, - "mutability": "Not" - }, - { - "ty": 25, - "span": 87, - "mutability": "Not" - }, - { - "ty": 9, - "span": 82, - "mutability": "Not" - }, - { - "ty": 21, - "span": 83, - "mutability": "Not" - }, - { - "ty": 28, - "span": 81, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 90, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 90, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 91, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 92, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 82, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 83, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 93 + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } } - ] + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h37a5a6e2382fe31bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 2, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 51, + "mutability": "Not" + }, + { + "ty": 2, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 94 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 94, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 12 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 94 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + }, + { + "ty": 32, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add18precondition_check17hb3b74e0f4857f64bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add::precondition_check", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 80 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 81 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 81 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + ] + } + } + } + ] + }, + "span": 82 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 84 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 79 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 86, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 66, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" } - ], - "spread_arg": null, - "span": 3 + }, + "ty": 24, + "id": 10 + } + } } - ] + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 87 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h4ef9f89b76c476d3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 95, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 95, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 95 + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 88 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 89, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 90, + "mutability": "Not" + }, + { + "ty": 9, + "span": 90, + "mutability": "Not" + }, + { + "ty": 25, + "span": 87, + "mutability": "Not" + }, + { + "ty": 9, + "span": 82, + "mutability": "Not" + }, + { + "ty": 21, + "span": 83, + "mutability": "Not" + }, + { + "ty": 28, + "span": 81, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 90, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 90, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 91, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 92, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 82, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 83, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 93 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hf8317f745557e08aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } } - ] + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 69 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 70, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 71 + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num20_$LT$impl$u20$u8$GT$13unchecked_add17h57df73ebe1c8a989E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 70, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 71 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 73 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "AddUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 74 + } + ], + "terminator": { + "kind": "Return", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 9, + "span": 75, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 76, + "mutability": "Not" + }, + { + "ty": 9, + "span": 77, + "mutability": "Not" + }, + { + "ty": 21, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 71, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 78 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN25arithmetic_unchecked_runs4main17h1bc17631fcb9d7bbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 10, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 101, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "AddUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 74 - } - ], - "terminator": { - "kind": "Return", - "span": 72 + }, + "ty": 9, + "id": 14 + } + } + }, + { + "Constant": { + "span": 102, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 14 } - ], - "locals": [ - { - "ty": 9, - "span": 75, + } + } + ] + } + ] + }, + "span": 103 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 101, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" - }, - { - "ty": 9, - "span": 76, - "mutability": "Not" - }, - { - "ty": 9, - "span": 77, - "mutability": "Not" - }, - { - "ty": 21, - "span": 69, + } + }, + "ty": 9, + "id": 14 + } + } + }, + { + "Constant": { + "span": 102, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" - }, - { - "ty": 1, - "span": 71, - "mutability": "Not" + } + }, + "ty": 9, + "id": 14 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 103 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 76, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + ] + } + } + } + ] + }, + "span": 103 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 104, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 15 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 105, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ], - "spread_arg": null, - "span": 78 + }, + "ty": 9, + "id": 16 + } + } } - ] + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 106 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hdc30c0db2ed02c63E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Constant": { + "span": 107, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 17 } - ], - "locals": [ - { - "ty": 1, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" + } + }, + { + "Constant": { + "span": 108, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 18 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 + } + } + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hbc9b51d6638817bfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 9, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 97, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 13 - } - } - } - } - ] - }, - "span": 97 - } + ] + }, + "span": 109 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Constant": { + "span": 107, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 96 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 98, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 99, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 99, - "scope": 0 + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 17 + } + } + }, + { + "Constant": { + "span": 108, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 18 + } + } + } + ] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 109 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "spread_arg": null, - "span": 100 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8edc29ddf1567ac9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 94 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 94, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 12 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 94 - } + ] + }, + "span": 109 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 110, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "span": 111, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ], - "locals": [ - { - "ty": 16, - "span": 94, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 94, - "mutability": "Not" - }, - { - "ty": 1, - "span": 94, - "mutability": "Not" - }, - { - "ty": 32, - "span": 94, - "mutability": "Not" + }, + "ty": 2, + "id": 20 + } + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 112 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 114 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 115 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 8, + "projection": [] + } + }, + { + "Copy": { + "local": 9, + "projection": [] + } + } + ] + } + ] + }, + "span": 113 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 10, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Move": { + "local": 9, + "projection": [] + } + } + ] + }, + "target": 5, + "unwind": "Continue" + } + }, + "span": 113 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 10, + "projection": [ + { + "Field": [ + 0, + 35 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 94 + ] + } + } } - ] + ] + }, + "span": 113 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 35 + ] + } + ] + }, + "span": 117 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 7, + "projection": [] + } + }, + { + "Copy": { + "local": 12, + "projection": [] + } + } + ] + } + ] + }, + "span": 116 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 7, + "projection": [] + } + }, + { + "Move": { + "local": 12, + "projection": [] + } + } + ] + }, + "target": 6, + "unwind": "Continue" + } + }, + "span": 116 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num20_$LT$impl$u20$i8$GT$13unchecked_sub17he4e31a0bf1fa656dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "SubUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 0, + 35 + ] } - ], - "locals": [ - { - "ty": 2, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 51, - "mutability": "Not" - }, - { - "ty": 2, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 116 + } + ], + "terminator": { + "kind": "Return", + "span": 118 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 119, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 120, + "mutability": "Not" + }, + { + "ty": 28, + "span": 103, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 121, + "mutability": "Not" + }, + { + "ty": 2, + "span": 122, + "mutability": "Not" + }, + { + "ty": 26, + "span": 109, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 123, + "mutability": "Not" + }, + { + "ty": 35, + "span": 124, + "mutability": "Not" + }, + { + "ty": 35, + "span": 114, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 115, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 113, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 125, + "mutability": "Not" + }, + { + "ty": 35, + "span": 117, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 116, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 120, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 121, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 122, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 123, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 124, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 7, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 125, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 126 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h675110f50b410d54E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 94, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 11 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 94 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 94, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 94, + "mutability": "Not" + }, + { + "ty": 1, + "span": 94, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h4ef9f89b76c476d3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 95, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 95, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 95 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h665493b8ec74817bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "arg_count": 2, - "var_debug_info": [ + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "Downcast": 0 }, { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "Field": [ + 0, + 6 + ] } - ], - "spread_arg": null, - "span": 53 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } + }, + "details": null + } + ], + "types": [ + [ + 21, + { + "RigidTy": "Bool" + } ], - "types": [ - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 35, - { - "RigidTy": { - "Int": "I16" - } - } - ] + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 35, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } ], - "debug": null -} \ No newline at end of file + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state index 4dfd2da71..0f2f3f8c5 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state @@ -31,23 +31,23 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 254 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 35 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 36 ) , mutabilityMut ) ) @@ -55,16 +55,16 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 97 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 96 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 99 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 84 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 86 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 87 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 88 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) .Bodies ) - ty ( 29 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 94 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 9 ) , span: span ( 75 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 10 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 105 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 109 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 111 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 112 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 115 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 113 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 118 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 116 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 126 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 97 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 97 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 96 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 98 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 99 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 80 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 81 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 82 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 83 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 84 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 85 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 86 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00B\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 87 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 88 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) + ty ( 29 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 94 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 94 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 94 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 94 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 94 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 94 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 94 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 70 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 72 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 9 ) , span: span ( 75 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 101 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) , operandConstant ( constOperand (... span: span ( 102 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 103 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 103 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 104 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 105 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 106 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 107 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 17 ) ) ) ) , operandConstant ( constOperand (... span: span ( 108 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 18 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 109 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 5 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 109 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 110 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 111 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 4 ) ) , unwind: unwindActionContinue ) , span: span ( 112 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 114 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 115 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 113 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 113 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 10 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 113 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 35 ) ) ) , span: span ( 117 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 116 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 35 ) ) .ProjectionElems ) ) ) ) , span: span ( 116 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 118 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 119 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 120 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 103 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 121 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 122 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 109 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 123 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 124 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 114 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 115 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 113 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 125 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 35 ) , span: span ( 117 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 116 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 120 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 121 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 122 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 123 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 124 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 125 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 126 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json index 587fdfc54..4f2cbdca4 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json @@ -1,2785 +1,2767 @@ { - "name": "arithmetic", - "crate_id": 3562334553558048806, - "allocs": [], - "functions": [ - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ] + "name": "arithmetic", + "crate_id": 3562334553558048806, + "allocs": [], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hddd54efbfb63f680E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E" + } + ], + [ + 33, + { + "NoOpSym": "" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hddd54efbfb63f680E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h408f33832fba4274E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + } + ] + ] } - ] + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "ty": 7, - "span": 43, - "mutability": "Not" + "Downcast": 0 }, { - "ty": 1, - "span": 43, - "mutability": "Not" + "Field": [ + 0, + 6 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22c96e4e98f6c015E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10arithmetic4main17hcd0e28aacae0c2e9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 9 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + } + } + ] + } + ] + }, + "span": 52 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 3 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 11 } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 11 + } + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 12 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 + } + } + ] + } + ] + }, + "span": 57 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 12 + } + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 100 + ], + "provenance": { + "ptrs": [] }, - "argument_index": 1 + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 13 + } + } + } + ] + }, + "target": 3, + "unwind": "Continue" + } + }, + "span": 57 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "spread_arg": null, - "span": 49 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 14 } - ], - "locals": [ - { - "ty": 16, - "span": 43, + } + } + ] + } + ] + }, + "span": 59 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 8, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 28 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" + } + }, + "ty": 2, + "id": 14 + } + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 59 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 8, + "projection": [ + { + "Field": [ + 0, + 2 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN10arithmetic4main17hcd0e28aacae0c2e9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - } - ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 11 - } - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 11 - } - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 12 - } - } - }, - { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - ] - } - ] - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 12 - } - } - }, - { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 100 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - ] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 14 - } - } - } - ] - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 28 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 14 - } - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 59 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 9 - ] - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 11, - "projection": [] - } - }, - { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - } - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 12, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Move": { - "local": 11, - "projection": [] - } - }, - { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - } - ] - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 12, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 10, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 63 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Move": { - "local": 10, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 63 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 13, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 63 - }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 65 - }, - { - "kind": { - "Assign": [ - { - "local": 16, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 66 - }, - { - "kind": { - "Assign": [ - { - "local": 17, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 15, - "projection": [] - } - }, - { - "Copy": { - "local": 16, - "projection": [] - } - } - ] - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 17, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Move": { - "local": 15, - "projection": [] - } - }, - { - "Move": { - "local": 16, - "projection": [] - } - } - ] - }, - "target": 7, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 17, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 64 - }, - { - "kind": { - "Assign": [ - { - "local": 19, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Copy": { - "local": 5, - "projection": [] - } - }, - 26 - ] - } - ] - }, - "span": 68 - }, - { - "kind": { - "Assign": [ - { - "local": 20, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 14, - "projection": [] - } - }, - { - "Copy": { - "local": 19, - "projection": [] - } - } - ] - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 20, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 14, - "projection": [] - } - }, - { - "Move": { - "local": 19, - "projection": [] - } - } - ] - }, - "target": 8, - "unwind": "Continue" - } - }, - "span": 67 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 18, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 20, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": "Return", - "span": 69 + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 11, + "projection": [] + } + }, + { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 9 } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 71, - "mutability": "Not" - }, - { - "ty": 27, - "span": 52, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 72, - "mutability": "Not" - }, - { - "ty": 27, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 73, - "mutability": "Not" - }, - { - "ty": 2, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 59, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 74, - "mutability": "Not" - }, - { - "ty": 9, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 62, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 75, - "mutability": "Not" - }, - { - "ty": 26, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 76, - "mutability": "Not" - }, - { - "ty": 26, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 67, + } + } + ] + } + ] + }, + "span": 61 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 12, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Move": { + "local": 11, + "projection": [] + } + }, + { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" + } + }, + "ty": 9, + "id": 9 + } + } + } + ] + }, + "target": 5, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 12, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 71, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 72, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 73, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "d", - "source_info": { - "span": 74, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 9, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 75, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 14, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "f", - "source_info": { - "span": 76, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 18, - "projection": [] - } - }, - "argument_index": null + ] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 63 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + }, + "target": 6, + "unwind": "Continue" + } + }, + "span": 63 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 13, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 77 + ] + } + } } - ] + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 65 + }, + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 66 + }, + { + "kind": { + "Assign": [ + { + "local": 17, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 15, + "projection": [] + } + }, + { + "Copy": { + "local": 16, + "projection": [] + } + } + ] + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 17, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Move": { + "local": 15, + "projection": [] + } + }, + { + "Move": { + "local": 16, + "projection": [] + } + } + ] + }, + "target": 7, + "unwind": "Continue" + } + }, + "span": 64 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h2376acb044c61e74E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 17, + "projection": [ + { + "Field": [ + 0, + 26 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 64 + }, + { + "kind": { + "Assign": [ + { + "local": 19, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 5, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 68 + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 14, + "projection": [] + } + }, + { + "Copy": { + "local": 19, + "projection": [] + } + } + ] + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 20, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 14, + "projection": [] + } + }, + { + "Move": { + "local": 19, + "projection": [] + } + } + ] + }, + "target": 8, + "unwind": "Continue" + } + }, + "span": 67 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 18, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 20, + "projection": [ + { + "Field": [ + 0, + 26 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": "Return", + "span": 69 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h408f33832fba4274E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 52, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 72, + "mutability": "Not" + }, + { + "ty": 27, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 73, + "mutability": "Not" + }, + { + "ty": 2, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 59, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 74, + "mutability": "Not" + }, + { + "ty": 9, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 75, + "mutability": "Not" + }, + { + "ty": 26, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 76, + "mutability": "Not" + }, + { + "ty": 26, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 67, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 71, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 72, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 73, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 74, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 75, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 76, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 18, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 77 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha416e9336579c441E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" + } }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h1579660f176b84e5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h2376acb044c61e74E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h046ff63ba666c500E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h9a78461d8520b72aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "Field": [ + 0, + 15 + ] }, { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 13 + ] + } + } } - ] + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" } + } ], - "types": [ - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 26, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 25, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ] + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } ], - "debug": null -} \ No newline at end of file + [ + 25, + { + "RigidTy": "Bool" + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state index 79b22201f..31fb43dd2 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state @@ -33,34 +33,34 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -100 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 28 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 27 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 255 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( typedValue ( Integer ( -32768 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 29 ) , mutabilityMut ) ) @@ -68,12 +68,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\xff" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 11 ) ) ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) , operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"d" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) , target: basicBlockIdx ( 3 ) , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 7 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x1c" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 14 ) ) ) ) ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionContinue ) , span: span ( 59 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 8 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) ) , target: basicBlockIdx ( 5 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 12 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpSub , operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 6 ) , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 13 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 17 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpMul , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 7 ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 17 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 19 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandCopy ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 19 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 8 ) , unwind: unwindActionContinue ) , span: span ( 67 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 20 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 70 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 59 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 77 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json index 2d5b11ed1..4ac711f72 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json @@ -1,1951 +1,1933 @@ { - "name": "unary", - "crate_id": 16478188162494399089, - "allocs": [], - "functions": [ - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E" - } - ] + "name": "unary", + "crate_id": 16478188162494399089, + "allocs": [], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start17hdc5efb1e0bda457bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE" + } + ], + [ + 27, + { + "NoOpSym": "" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + "provenance": { + "ptrs": [] }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "align": 1, + "mutability": "Mut" + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 + "ty": 17, + "id": 8 + } + } + } } - ] + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h6102650d02f5b9f6E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h6102650d02f5b9f6E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN5unary4main17hb4d720234eb3817dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN5unary4main17hb4d720234eb3817dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - } - ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 9 - } - } - }, - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 9, - "id": 10 - } - } - } - ] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 133 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 - } - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "UnaryOp": [ - "Not", - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 12 - } - } - } - ] - } - ] - }, - "span": 58 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [] - } - }, - "expected": false, - "msg": { - "OverflowNeg": { - "Copy": { - "local": 4, - "projection": [] - } - } - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 53 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "UnaryOp": [ - "Neg", - { - "Copy": { - "local": 4, - "projection": [] - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": "Return", - "span": 59 + "local": 2, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 9, + "id": 9 } - ], - "locals": [ - { - "ty": 1, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 61, - "mutability": "Not" - }, - { - "ty": 26, - "span": 52, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 62, - "mutability": "Not" - }, - { - "ty": 2, - "span": 63, - "mutability": "Not" - }, - { - "ty": 25, - "span": 64, - "mutability": "Not" - }, - { - "ty": 2, - "span": 65, - "mutability": "Not" - }, - { - "ty": 25, - "span": 53, - "mutability": "Mut" + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 9, + "id": 10 } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 61, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 62, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 63, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + } + } + ] + } + ] + }, + "span": 52 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 127 + ], + "provenance": { + "ptrs": [] }, - "argument_index": null + "align": 1, + "mutability": "Mut" + } }, - { - "name": "d", - "source_info": { - "span": 64, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + "ty": 9, + "id": 9 + } + } + }, + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] }, - "argument_index": null + "align": 1, + "mutability": "Mut" + } }, - { - "name": "e", - "source_info": { - "span": 65, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null + "ty": 9, + "id": 10 + } + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 9 + ] } - ], - "spread_arg": null, - "span": 66 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "local": 3, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 133 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 11 } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + } + } + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "local": 5, + "projection": [] + }, + { + "UnaryOp": [ + "Not", + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 25, + "id": 12 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 + } + } + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hfaf68eb4bca11ec8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ + ] + }, + "span": 58 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } + }, + "ty": 2, + "id": 13 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 + } + } + ] } - ] + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [] + } + }, + "expected": false, + "msg": { + "OverflowNeg": { + "Copy": { + "local": 4, + "projection": [] + } + } + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 53 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ + }, + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + "local": 6, + "projection": [] + }, + { + "UnaryOp": [ + "Neg", + { + "Copy": { + "local": 4, + "projection": [] + } + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": "Return", + "span": 59 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 61, + "mutability": "Not" + }, + { + "ty": 26, + "span": 52, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 62, + "mutability": "Not" + }, + { + "ty": 2, + "span": 63, + "mutability": "Not" + }, + { + "ty": 25, + "span": 64, + "mutability": "Not" + }, + { + "ty": 2, + "span": 65, + "mutability": "Not" + }, + { + "ty": 25, + "span": 53, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 61, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 62, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 63, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 64, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 65, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 66 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h770d42789cc816fdE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h9a122567832c9ff4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hdc5efb1e0bda457bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "spread_arg": null, - "span": 42 + } + ] + ] } - ] + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h51d05a9e9b249329E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } + "Downcast": 0 }, { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } + "Field": [ + 0, + 6 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h69cc40d36c7689e0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17ha3656d0fc756ed53E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, { - "ty": 22, - "span": 44, - "mutability": "Not" + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + ] + } + } } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17ha3656d0fc756ed53E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } + }, + "details": null + } + ], + "types": [ + [ + 25, + { + "RigidTy": "Bool" + } ], - "types": [ - [ - 25, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ] + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } ], - "debug": null -} \ No newline at end of file + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state index b5e026aa5..c038a0bfb 100644 --- a/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state +++ b/kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state @@ -27,14 +27,14 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 255 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( Moved ) ListItem ( Moved ) ) , ty ( 26 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 0 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -122 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) @@ -42,12 +42,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x85" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: false , msg: assertMessageOverflowNeg ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNeg , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 63 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) , expected: false , msg: assertMessageOverflow ( binOpAdd , operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x7f" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 9 ) ) ) ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 9 ) , id: mirConstId ( 10 ) ) ) ) ) , target: basicBlockIdx ( 1 ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x85" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNot , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: assert (... cond: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , expected: false , msg: assertMessageOverflowNeg ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUnaryOp ( unOpNeg , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 52 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 63 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json index a7b2eb531..2b5c079a7 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.smir.json @@ -1 +1,2161 @@ -{"name":"assign_cast2","crate_id":2350940226393625358,"allocs":[],"functions":[[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[33,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h11453166664855b3E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h28b446e5bad970fcE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h7179fe126d65311fE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h57c7180edb6a8d4dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf72b8252ed673ed3E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h2ac90369701c0f15E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN12assign_cast24main17h62f0e7a858f55442E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":51,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[128,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":25,"id":9}}}}]},"span":51},{"kind":{"Assign":[{"local":2,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},2]}]},"span":52},{"kind":{"Assign":[{"local":3,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},26]}]},"span":53},{"kind":{"Assign":[{"local":4,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":1,"projection":[]}},16]}]},"span":54},{"kind":{"Assign":[{"local":5,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},26]}]},"span":55},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},27]}]},"span":56},{"kind":{"Assign":[{"local":7,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},2]}]},"span":57},{"kind":{"Assign":[{"local":8,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},2]}]},"span":58},{"kind":{"Assign":[{"local":9,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},25]}]},"span":59},{"kind":{"Assign":[{"local":10,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},28]}]},"span":60},{"kind":{"Assign":[{"local":11,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":2,"projection":[]}},25]}]},"span":61},{"kind":{"Assign":[{"local":12,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},29]}]},"span":62},{"kind":{"Assign":[{"local":13,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":3,"projection":[]}},9]}]},"span":63},{"kind":{"Assign":[{"local":14,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":4,"projection":[]}},9]}]},"span":64},{"kind":{"Assign":[{"local":15,"projection":[]},{"Cast":["IntToInt",{"Copy":{"local":6,"projection":[]}},28]}]},"span":65}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"},{"ty":25,"span":67,"mutability":"Not"},{"ty":2,"span":68,"mutability":"Not"},{"ty":26,"span":69,"mutability":"Not"},{"ty":16,"span":70,"mutability":"Not"},{"ty":26,"span":71,"mutability":"Not"},{"ty":27,"span":72,"mutability":"Not"},{"ty":2,"span":73,"mutability":"Not"},{"ty":2,"span":74,"mutability":"Not"},{"ty":25,"span":75,"mutability":"Not"},{"ty":28,"span":76,"mutability":"Not"},{"ty":25,"span":77,"mutability":"Not"},{"ty":29,"span":78,"mutability":"Not"},{"ty":9,"span":79,"mutability":"Not"},{"ty":9,"span":80,"mutability":"Not"},{"ty":28,"span":81,"mutability":"Not"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":68,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"c","source_info":{"span":69,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null},{"name":"d","source_info":{"span":70,"scope":4},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"e","source_info":{"span":71,"scope":5},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null},{"name":"f","source_info":{"span":72,"scope":6},"composite":null,"value":{"Place":{"local":6,"projection":[]}},"argument_index":null},{"name":"g","source_info":{"span":73,"scope":7},"composite":null,"value":{"Place":{"local":7,"projection":[]}},"argument_index":null},{"name":"h","source_info":{"span":74,"scope":8},"composite":null,"value":{"Place":{"local":8,"projection":[]}},"argument_index":null},{"name":"i","source_info":{"span":75,"scope":9},"composite":null,"value":{"Place":{"local":9,"projection":[]}},"argument_index":null},{"name":"j","source_info":{"span":76,"scope":10},"composite":null,"value":{"Place":{"local":10,"projection":[]}},"argument_index":null},{"name":"k","source_info":{"span":77,"scope":11},"composite":null,"value":{"Place":{"local":11,"projection":[]}},"argument_index":null},{"name":"l","source_info":{"span":78,"scope":12},"composite":null,"value":{"Place":{"local":12,"projection":[]}},"argument_index":null},{"name":"m","source_info":{"span":79,"scope":13},"composite":null,"value":{"Place":{"local":13,"projection":[]}},"argument_index":null},{"name":"n","source_info":{"span":80,"scope":14},"composite":null,"value":{"Place":{"local":14,"projection":[]}},"argument_index":null},{"name":"o","source_info":{"span":81,"scope":15},"composite":null,"value":{"Place":{"local":15,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h3f80f4d2567d1397E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h011c262af6fc81d1E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[25,{"RigidTy":{"Uint":"U16"}}],[26,{"RigidTy":{"Int":"I16"}}],[28,{"RigidTy":{"Uint":"U32"}}],[29,{"RigidTy":{"Uint":"U64"}}],[27,{"RigidTy":{"Int":"I64"}}],[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file +{ + "name": "assign_cast", + "crate_id": 13002952174156868308, + "allocs": [], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE" + } + ], + [ + 30, + { + "NoOpSym": "" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0a70c56a5c4492dfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9a7856aa69d6d138E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN11assign_cast4main17ha51d0dbb589964c1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 128, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 9 + } + } + } + } + ] + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + 26 + ] + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 27 + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 2 + ] + } + ] + }, + "span": 58 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 25 + ] + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 28 + ] + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + 25 + ] + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 29 + ] + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + 9 + ] + } + ] + }, + "span": 64 + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 28 + ] + } + ] + }, + "span": 65 + } + ], + "terminator": { + "kind": "Return", + "span": 50 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 67, + "mutability": "Not" + }, + { + "ty": 2, + "span": 68, + "mutability": "Not" + }, + { + "ty": 26, + "span": 69, + "mutability": "Not" + }, + { + "ty": 16, + "span": 70, + "mutability": "Not" + }, + { + "ty": 26, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 72, + "mutability": "Not" + }, + { + "ty": 2, + "span": 73, + "mutability": "Not" + }, + { + "ty": 2, + "span": 74, + "mutability": "Not" + }, + { + "ty": 25, + "span": 75, + "mutability": "Not" + }, + { + "ty": 28, + "span": 76, + "mutability": "Not" + }, + { + "ty": 25, + "span": 77, + "mutability": "Not" + }, + { + "ty": 29, + "span": 78, + "mutability": "Not" + }, + { + "ty": 9, + "span": 79, + "mutability": "Not" + }, + { + "ty": 9, + "span": 80, + "mutability": "Not" + }, + { + "ty": 28, + "span": 81, + "mutability": "Not" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 68, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 69, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "d", + "source_info": { + "span": 70, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "e", + "source_info": { + "span": 71, + "scope": 5 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "f", + "source_info": { + "span": 72, + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "g", + "source_info": { + "span": 73, + "scope": 7 + }, + "composite": null, + "value": { + "Place": { + "local": 7, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "h", + "source_info": { + "span": 74, + "scope": 8 + }, + "composite": null, + "value": { + "Place": { + "local": 8, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "i", + "source_info": { + "span": 75, + "scope": 9 + }, + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "j", + "source_info": { + "span": 76, + "scope": 10 + }, + "composite": null, + "value": { + "Place": { + "local": 10, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "k", + "source_info": { + "span": 77, + "scope": 11 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "l", + "source_info": { + "span": 78, + "scope": 12 + }, + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "m", + "source_info": { + "span": 79, + "scope": 13 + }, + "composite": null, + "value": { + "Place": { + "local": 13, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "n", + "source_info": { + "span": 80, + "scope": 14 + }, + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "o", + "source_info": { + "span": 81, + "scope": 15 + }, + "composite": null, + "value": { + "Place": { + "local": 15, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 82 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h41dadfed205e19edE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hb5b25907048cfcaeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h0c5508395a66cec3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h3af2b128a918c128E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h288039b41f3b1bacE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h5f5fa8aba711bbb4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 29, + { + "RigidTy": { + "Uint": "U64" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 28, + { + "RigidTy": { + "Uint": "U32" + } + } + ], + [ + 25, + { + "RigidTy": { + "Uint": "U16" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 27, + { + "RigidTy": { + "Int": "I64" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state index 356632fa5..326e8ac9e 100644 --- a/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state +++ b/kmir/src/tests/integration/data/exec-smir/assign-cast/assign-cast.state @@ -25,34 +25,34 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -32640 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 16 , true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 64 , true ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( -128 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 65408 , 16 , false ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 64 , false ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 128 , 8 , false ) , ty ( 9 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 32896 , 32 , false ) , ty ( 28 ) , mutabilityNot ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x80\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 27 ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 2 ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , ty ( 25 ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 29 ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , ty ( 9 ) ) ) , span: span ( 64 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandCopy ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 28 ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 67 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 69 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 72 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 73 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 74 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 77 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 78 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 79 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 9 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 81 ) , mut: mutabilityNot ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "d" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "g" ) , sourceInfo: sourceInfo (... span: span ( 73 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "h" ) , sourceInfo: sourceInfo (... span: span ( 74 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 9 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "j" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 10 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "k" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 11 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "l" ) , sourceInfo: sourceInfo (... span: span ( 78 ) , scope: sourceScope ( 12 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "m" ) , sourceInfo: sourceInfo (... span: span ( 79 ) , scope: sourceScope ( 13 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 13 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "n" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 14 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "o" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 15 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 82 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state index d0916639e..fcae5e94d 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.23.state @@ -25,25 +25,25 @@ unwindActionContinue - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state new file mode 100644 index 000000000..fcae5e94d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.27.state @@ -0,0 +1,62 @@ + + + #execBlock ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) ~> .K + + + noReturn + + + ty ( 27 ) + + + + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) ) + + + ty ( 25 ) + + + place (... local: local ( 0 ) , projection: .ProjectionElems ) + + + someBasicBlockIdx ( basicBlockIdx ( 1 ) ) + + + unwindActionContinue + + + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 11 , 16 , true ) , ty ( 28 ) , mutabilityNot ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 64 , false ) , ty ( 26 ) , mutabilityNot ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 58 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 59 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "_s" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_t" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 52 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 53 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 54 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 55 ) ) ) ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) + ty ( 28 ) |-> rigidTyInt ( intTyI16 ) + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json index 7073dd042..0e8e20a56 100644 --- a/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/call-with-args/main-a-b-with-int.smir.json @@ -1,1753 +1,1731 @@ { - "name": "main_a_b_with_int", - "crate_id": 9173310213495213748, - "allocs": [], - "functions": [ - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 32, - { - "NoOpSym": "" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" - } - ], - [ - 27, - { - "NormalSym": "_ZN17main_a_b_with_int1b17h92605682282418dbE" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" - } - ], - [ - 25, - { - "NormalSym": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" - } - ] + "name": "main_a_b_with_int", + "crate_id": 9173310213495213748, + "allocs": [], + "functions": [ + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN17main_a_b_with_int4main17h37f7f24b825d5c5dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE" + } + ], + [ + 27, + { + "NormalSym": "_ZN17main_a_b_with_int1b17h92605682282418dbE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE" + } + ], + [ + 29, + { + "NoOpSym": "" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E" + } + ], + [ + 25, + { + "NormalSym": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 10 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 53 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 54, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 55 + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } } - ] + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 } - }, - "details": null - }, - { - "symbol_name": "_ZN17main_a_b_with_int1b17h92605682282418dbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "b", - "id": 8, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 65, - "mutability": "Not" - }, - { - "ty": 28, - "span": 66, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "_s", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "_t", - "source_info": { - "span": 66, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 67 + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - ] + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hfb4d01dc98c21e58E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int4main17h37f7f24b825d5c5dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 + }, + "ty": 26, + "id": 10 + } + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 52 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 53 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h96705bf254340eb7E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 54, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 55 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h343aa02f84d02209E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E", + "mono_item_kind": { + "MonoItemFn": { + "name": "a", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 11 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 11, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + }, + "ty": 28, + "id": 12 + } + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 58 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 59 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h8fe3c7bcc442bebeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 61, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 62 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h96705bf254340eb7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN17main_a_b_with_int1b17h92605682282418dbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "b", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 65, + "mutability": "Not" + }, + { + "ty": 28, + "span": 66, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "_s", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "_t", + "source_info": { + "span": 66, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 67 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, + "provenance": { + "ptrs": [] + }, + "align": 1, "mutability": "Mut" + } }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + "ty": 17, + "id": 8 + } + } + } } - ] + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hfb4d01dc98c21e58E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + } + ] + ] } - ] + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h7792b3db2c12fcdbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "Downcast": 0 }, { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + "Field": [ + 0, + 6 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3c6de04caa56bbcbE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - }, - "details": null - }, - { - "symbol_name": "_ZN17main_a_b_with_int1a17h55bc10e786653b90E", - "mono_item_kind": { - "MonoItemFn": { - "name": "a", - "id": 7, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h446dd3779801f357E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 11 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 11, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 12 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 58 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 59 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "s", - "source_info": { - "span": 61, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "spread_arg": null, - "span": 62 + ] + } + } } - ] + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h343aa02f84d02209E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + "Move": { + "local": 3, + "projection": [] + } } - ] + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h4d159dfcc92a7787E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, { - "ty": 1, - "span": 48, - "mutability": "Not" + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 + ] + } + } } - ] + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - }, - "details": null + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } + }, + "details": null + } + ], + "types": [ + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } ], - "types": [ - [ - 28, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 26, - { - "RigidTy": { - "Uint": "Usize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ] + [ + 28, + { + "RigidTy": { + "Int": "I16" + } + } ], - "debug": null -} \ No newline at end of file + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 26, + { + "RigidTy": { + "Uint": "Usize" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state index a1f32b1d1..0fc3fa20d 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.19.state @@ -25,24 +25,24 @@ unwindActionContinue - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( 25 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( 0 ) , projection: .ProjectionElems ) , someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwindActionContinue , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state index 17446d8ca..df42932d5 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.run.state @@ -26,22 +26,22 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) .Bodies ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "a" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 10 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 59 ) ) ) ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "b" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 11 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 64 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "c" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 52 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 53 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: .VarDebugInfos , spreadArg: noLocal , span: span ( 54 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json index 9d40edd0d..ebdb4e0d4 100644 --- a/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/main-a-b-c/main-a-b-c.smir.json @@ -1 +1,1659 @@ -{"name":"main_a_b_c","crate_id":2129868149476588123,"allocs":[],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E"}],[20,{"IntrinsicSym":"black_box"}],[27,{"NormalSym":"_ZN10main_a_b_c1c17h59101d2318335bbdE"}],[25,{"NormalSym":"_ZN10main_a_b_c1a17hf96e7944faad0bd0E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[26,{"NormalSym":"_ZN10main_a_b_c1b17hbedf65f2538ce3adE"}],[31,{"NoOpSym":""}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start17he509fe31442a28c4E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1b17hbedf65f2538ce3adE","mono_item_kind":{"MonoItemFn":{"name":"b","id":8,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":27,"id":11}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":61}},{"statements":[],"terminator":{"kind":"Return","span":62}}],"locals":[{"ty":1,"span":63,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":64}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c4main17hcaca459da1b06b9fE","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":50,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":9}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":51}},{"statements":[],"terminator":{"kind":"Return","span":52}}],"locals":[{"ty":1,"span":53,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":54}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1a17hf96e7944faad0bd0E","mono_item_kind":{"MonoItemFn":{"name":"a","id":7,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":55,"user_ty":null,"const_":{"kind":"ZeroSized","ty":26,"id":10}}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":56}},{"statements":[],"terminator":{"kind":"Return","span":57}}],"locals":[{"ty":1,"span":58,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":59}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN10main_a_b_c1c17h59101d2318335bbdE","mono_item_kind":{"MonoItemFn":{"name":"c","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":67}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file +{ + "name": "main_a_b_c", + "crate_id": 2129868149476588123, + "allocs": [], + "functions": [ + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE" + } + ], + [ + 25, + { + "NormalSym": "_ZN10main_a_b_c1a17hf96e7944faad0bd0E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E" + } + ], + [ + 31, + { + "NoOpSym": "" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 27, + { + "NormalSym": "_ZN10main_a_b_c1c17h59101d2318335bbdE" + } + ], + [ + 26, + { + "NormalSym": "_ZN10main_a_b_c1b17hbedf65f2538ce3adE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN10main_a_b_c1c17h59101d2318335bbdE", + "mono_item_kind": { + "MonoItemFn": { + "name": "c", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 66, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 67 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10main_a_b_c4main17hcaca459da1b06b9fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 52 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 53, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 54 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17he509fe31442a28c4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hba596ab1e21f4dfaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h5775674bf1184c46E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h88c62a39fb1b342bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h651e2df3ec0dc2ccE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10main_a_b_c1a17hf96e7944faad0bd0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "a", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 10 + } + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 57 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 58, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 59 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h98accbb0a20ea4f5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10main_a_b_c1b17hbedf65f2538ce3adE", + "mono_item_kind": { + "MonoItemFn": { + "name": "b", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 11 + } + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 63, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17he57786f330055d2dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hde47e0bf03682721E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json index 0b911681f..804577cd2 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.smir.json @@ -84,12 +84,6 @@ ] ], "functions": [ - [ - 31, - { - "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E" - } - ], [ 0, { @@ -103,51 +97,51 @@ } ], [ - 23, + 14, { - "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E" } ], [ - 32, + 20, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "IntrinsicSym": "black_box" } ], [ - 26, + 32, { - "NormalSym": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 35, + 19, { - "NoOpSym": "" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E" } ], [ - 14, + 31, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E" + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E" } ], [ - 19, + 37, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E" + "NoOpSym": "" } ], [ - 20, + 26, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E" } ], [ - 27, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E" + "NormalSym": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE" } ], [ @@ -155,2497 +149,2479 @@ { "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E" } + ], + [ + 27, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E" + } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE", + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E", "mono_item_kind": { "MonoItemFn": { - "name": "std::cmp::impls::::eq", + "name": "std::cmp::impls::::eq", "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] } } - ] - }, - "span": 54 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 55 - } - ], - "terminator": { + "span": 54 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 7 - } - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + } + ] }, - "span": 53 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 + "span": 55 } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 } - ], - "locals": [ - { - "ty": 21, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 25, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 58, + "mutability": "Not" + }, + { + "ty": 24, + "span": 59, + "mutability": "Not" + }, + { + "ty": 25, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { "span": 58, - "mutability": "Not" - }, - { - "ty": 25, - "span": 59, - "mutability": "Not" + "scope": 0 }, - { - "ty": 22, - "span": 58, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 22, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { "span": 59, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 58, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "scope": 0 }, - { - "name": "other", - "source_info": { - "span": 59, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 60 - } - ] + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 29, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } + "StorageLive": 2 }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { + "span": 16 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageLive": 3 }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 - } - }, - { - "statements": [], - "terminator": { + "span": 15 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, "projection": [] }, - "target": 4, - "unwind": "Terminate" - } + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 61 + "span": 17 } - } - ], - "locals": [ - { - "ty": 16, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - }, - { - "ty": 30, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 10 - } - } - } } - ] + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 64 - } - ], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 66, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 66, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 15 } - ], - "spread_arg": null, - "span": 67 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::cmp::impls::::eq", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 44 + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - { - "kind": { - "Assign": [ - { + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { "local": 3, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 44 + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 }, - { - "kind": { - "StorageLive": 4 - }, - "span": 45 + "span": 21 + }, + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - } - ] - }, - "span": 45 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] } - } - ] + ] + } } - ] - }, - "span": 46 + } + ] }, - { - "kind": { - "StorageDead": 4 - }, - "span": 47 + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] }, - { - "kind": { - "StorageDead": 3 - }, - "span": 47 - } - ], - "terminator": { - "kind": "Return", - "span": 43 + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "locals": [ - { - "ty": 21, - "span": 48, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 49, - "mutability": "Not" - }, - { - "ty": 22, - "span": 50, - "mutability": "Not" + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } }, - { - "ty": 2, - "span": 44, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 2, - "span": 45, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 49, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "name": "other", - "source_info": { - "span": 50, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 51 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h639586c1861cdbc5E", + "symbol_name": "_ZN3std2rt10lang_start17h00fbe264978df755E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ { - "Field": [ - 0, - 7 - ] + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { + ] + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 3, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 15 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } + "args": [ + { + "Move": { + "local": 6, + "projection": [] } }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + { + "Move": { + "local": 2, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + { + "Move": { + "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + }, + { + "Move": { + "local": 4, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } } - ] + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] } - }, - 16 - ] + ] + } } - ] - }, - "span": 24 + } + ] }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN9doubleRef4main17h95ea92da4b4a3e96E", + "symbol_name": "_ZN4core3cmp5impls53_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i8$GT$2eq17he63f1e1ae1cab784E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 - } - } - } - } - ] - }, - "span": 69 + "name": "std::cmp::impls::::eq", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] + "span": 44 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } } - ] - }, - "span": 70 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [] - } - ] - } - ] - }, - "span": 71 + "span": 44 + }, + { + "kind": { + "StorageLive": 4 }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "CopyForDeref": { - "local": 3, + "span": 45 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, "projection": [ "Deref" ] } } - ] - }, - "span": 72 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 13, - "projection": [ - "Deref" - ] + "span": 45 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } - } - ] - }, - "span": 72 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 68 - } - ], - "terminator": { + "span": 46 + }, + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } + "StorageDead": 4 + }, + "span": 47 + }, + { + "kind": { + "StorageDead": 3 + }, + "span": 47 + } + ], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 48, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 49, + "mutability": "Not" + }, + { + "ty": 22, + "span": 50, + "mutability": "Not" + }, + { + "ty": 2, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 45, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 49, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 50, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 51 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h4216c834d85c12c9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] } - } + ] }, - "span": 68 + "span": 61 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 29, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 3, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + }, + { + "ty": 30, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h484e2183c4c007e2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 8 } - ] + } }, - "span": 75 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 11, - "projection": [] - } + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" ] } - ] - }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 9, + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 10, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 76 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17ha0daa83d4f9d3acfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::cmp::impls::::eq", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 73, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 12 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Move": { - "local": 9, - "projection": [] + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] } } - ], - "destination": { - "local": 7, - "projection": [] - }, - "target": 3, - "unwind": "Continue" - } + } + ] }, - "span": 73 - } - }, - { - "statements": [], - "terminator": { + "span": 54 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 77, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 33, - "id": 14 - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] } } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 77 + "span": 55 } - }, - { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 7 + } + } + }, + "args": [ + { "Move": { - "local": 7, + "local": 3, "projection": [] } }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 4 + { + "Move": { + "local": 4, + "projection": [] + } } - } - }, - "span": 73 + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 53 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + } + ], + "locals": [ + { + "ty": 21, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 58, + "mutability": "Not" + }, + { + "ty": 25, + "span": 59, + "mutability": "Not" + }, + { + "ty": 22, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 59, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 58, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 + "argument_index": 1 + }, + { + "name": "other", + "source_info": { + "span": 59, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } }, - { - "statements": [], - "terminator": { + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 60 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 61 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 61, + "mutability": "Not" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 61 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h86b66706186f3344E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 64, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 33, - "id": 15 + "ty": 17, + "id": 10 } } } - ], - "destination": { - "local": 12, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 79 + "span": 64 } + ], + "terminator": { + "kind": "Return", + "span": 63 } - ], - "locals": [ - { - "ty": 1, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 81, - "mutability": "Not" - }, - { - "ty": 22, - "span": 82, - "mutability": "Not" - }, - { - "ty": 25, - "span": 83, - "mutability": "Not" - }, - { - "ty": 21, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 34, - "span": 77, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 76, - "mutability": "Not" - }, - { - "ty": 22, - "span": 75, - "mutability": "Not" - }, - { - "ty": 34, - "span": 79, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 83, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 81, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "y", - "source_info": { - "span": 82, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 83, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] + } + ], + "locals": [ + { + "ty": 17, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 66, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 66, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 84 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h7861fc27b244f735E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 } - } - ], - "locals": [ - { - "ty": 1, - "span": 62, - "mutability": "Mut" }, - { - "ty": 28, - "span": 62, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 62 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 67 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17h00fbe264978df755E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 } - ] + } }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 1, "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { "Constant": { - "span": 0, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 0, - "id": 0 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 7 + "target": 2, + "unwind": "Unreachable" } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + }, + "span": 35 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 4 + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hec86baa41f4f8d10E", + "symbol_name": "_ZN9doubleRef4main17h95ea92da4b4a3e96E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "Assign": [ + { + "local": 1, + "projection": [] }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { + { + "Use": { "Constant": { - "span": 32, + "span": 69, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 11 } } } - ], - "destination": { - "local": 0, + } + ] + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 2, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 70 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [] } - } - ], - "destination": { - "local": 2, + ] + } + ] + }, + "span": 71 + }, + { + "kind": { + "Assign": [ + { + "local": 13, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } + { + "CopyForDeref": { + "local": 3, + "projection": [ + "Deref" + ] + } + } + ] }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } + "span": 72 }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 13, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 72 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 68 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 } } }, - "argument_index": 1 + "span": 68 } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h484e2183c4c007e2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 8 + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 3, + "projection": [] } - } + ] + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] }, - "args": [ - { - "Move": { + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, "projection": [] } - } - ], - "destination": { - "local": 0, + ] + } + ] + }, + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 10, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 11, + "projection": [] + } + ] + } + ] }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h6d3c11e59c981c95E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "span": 76 + }, + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, + "Assign": [ + { + "local": 9, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 10, + "projection": [] + } + ] + } + ] }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 61 + "span": 76 } - } - ], - "locals": [ - { - "ty": 1, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 61, - "mutability": "Not" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 61 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3cmp5impls69_$LT$impl$u20$core..cmp..PartialEq$LT$$RF$B$GT$$u20$for$u20$$RF$A$GT$2eq17h98d9c9cd2a8bb147E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::cmp::impls::::eq", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 12 } - ] + } }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 4, + "args": [ + { + "Move": { + "local": 8, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } } - ] + }, + { + "Move": { + "local": 9, + "projection": [] + } + } + ], + "destination": { + "local": 7, + "projection": [] }, - "span": 55 + "target": 3, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + "span": 73 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 77, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { "Constant": { - "span": 52, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 33, + "id": 14 } } - ], - "destination": { - "local": 0, + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, "projection": [] - }, - "target": 1, - "unwind": "Continue" + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 } - }, - "span": 53 - } + } + }, + "span": 73 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 33, + "id": 15 + } + } + } + ], + "destination": { + "local": 12, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 79 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 81, + "mutability": "Not" + }, + { + "ty": 22, + "span": 82, + "mutability": "Not" + }, + { + "ty": 25, + "span": 83, + "mutability": "Not" + }, + { + "ty": 21, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 34, + "span": 77, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 76, + "mutability": "Not" + }, + { + "ty": 22, + "span": 75, + "mutability": "Not" + }, + { + "ty": 34, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 83, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 81, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 21, - "span": 57, - "mutability": "Mut" }, - { - "ty": 24, - "span": 58, - "mutability": "Not" + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 82, + "scope": 2 }, - { - "ty": 24, - "span": 59, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 25, - "span": 58, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 83, + "scope": 3 }, - { - "ty": 25, - "span": 59, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 58, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "name": "other", - "source_info": { - "span": 59, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h7861fc27b244f735E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 } - ], - "spread_arg": null, - "span": 60 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 62, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 62 + } } }, "details": null @@ -2653,18 +2629,16 @@ ], "types": [ [ - 9, + 21, { - "RigidTy": { - "Uint": "U8" - } + "RigidTy": "Bool" } ], [ - 6, + 2, { "RigidTy": { - "Int": "Isize" + "Int": "I8" } } ], @@ -2677,16 +2651,18 @@ } ], [ - 21, + 9, { - "RigidTy": "Bool" + "RigidTy": { + "Uint": "U8" + } } ], [ - 2, + 6, { "RigidTy": { - "Int": "I8" + "Int": "Isize" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state index 473de3a2a..ad32c52d7 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/doubleRef.state @@ -30,35 +30,35 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 2 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) - ListItem ( noValue ( ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 11 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 22 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) - ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) .Bodies ) - ty ( 27 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) .Bodies ) - ty ( 29 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) + ty ( 26 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 44 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 44 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 45 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 46 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 47 ) ) statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 48 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 49 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 50 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 44 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 45 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 49 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 50 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 51 ) ) ) ) + ty ( 27 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 29 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 30 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 61 ) ) ) ) + ty ( 29 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "std::cmp::impls::::eq" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 6 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 53 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 21 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 59 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "other" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) , span: span ( 71 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 13 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 3 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 13 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 72 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 68 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 8 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 11 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 10 ) , projection: .ProjectionElems ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 73 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 12 ) ) ) ) , args: operandMove ( place (... local: local ( 8 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 7 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 3 ) ) , unwind: unwindActionContinue ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 77 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 77 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 79 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 32 ) , id: mirConstId ( 13 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 33 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 12 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 79 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 25 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 68 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 77 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 21 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 22 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 34 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 22 ) , span: span ( 83 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json index c0bd3bf34..472f5fc06 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.smir.json @@ -3,7 +3,7 @@ "crate_id": 4352655527695101489, "allocs": [ [ - 2, + 3, { "Memory": { "bytes": [ @@ -30,7 +30,7 @@ 61, 61, 32, - 51, + 50, 50 ], "provenance": { @@ -42,7 +42,7 @@ } ], [ - 3, + 2, { "Memory": { "bytes": [ @@ -69,7 +69,7 @@ 61, 61, 32, - 50, + 51, 50 ], "provenance": { @@ -89,33 +89,33 @@ } ], [ - 26, + 13, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E" } ], [ - 19, + 26, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 13, + 21, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE" } ], [ - 35, + 19, { - "NoOpSym": "" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E" } ], [ - 23, + 35, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E" + "NoOpSym": "" } ], [ @@ -125,9 +125,9 @@ } ], [ - 21, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h127646048c4d5d9bE" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E" } ], [ @@ -146,275 +146,447 @@ "uneval_consts": [], "items": [ { - "symbol_name": "_ZN10mutableRef1f17h63ad688e5733c791E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E", "mono_item_kind": { "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 15 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - } + ] } } - ] - }, - "span": 70 - } - ], - "terminator": { - "kind": "Return", - "span": 68 + } + ] + }, + "span": 17 } - } - ], - "locals": [ - { - "ty": 1, - "span": 71, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "y", - "source_info": { - "span": 72, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 15 } - ], - "spread_arg": null, - "span": 73 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } - ], - "destination": { - "local": 0, + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 22 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { - "local": 2, + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 }, - "span": 35 + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" }, - { - "ty": 7, - "span": 38, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h8964be79673df687E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 42 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -425,1372 +597,1317 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + }, + [ { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 + } ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 5, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 1 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 6, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 6 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { "span": 9, - "mutability": "Not" + "scope": 0 }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 9, - "span": 12, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN10mutableRef4main17h93ec5d833ede8e5dE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 - } - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 32, - 2 - ] - ], - "otherwise": 3 } - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 22 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 11 - } - } - } - } - ] + "args": [], + "destination": { + "local": 0, + "projection": [] }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "span": 60 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 22, - 4 - ] - ], - "otherwise": 5 - } - } - }, - "span": 56 - } - }, - { - "statements": [], - "terminator": { + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 12 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 46, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 25, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 13 + "ty": 17, + "id": 8 } } } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 61 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - { - "statements": [], - "terminator": { + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN10mutableRef1f17h63ad688e5733c791E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 12 - } - } + "Assign": [ + { + "local": 1, + "projection": [ + "Deref" + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 69, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 25, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 32 ], "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 14 + "ty": 2, + "id": 15 } } } - ], - "destination": { - "local": 8, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 63 + "span": 70 } + ], + "terminator": { + "kind": "Return", + "span": 68 } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 51, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 55, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 66, - "mutability": "Not" - }, - { - "ty": 2, - "span": 60, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 1, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 72, + "scope": 0 }, - { - "ty": 29, - "span": 63, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 65, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "name": "xref", - "source_info": { - "span": 66, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 67 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h53ed6cdf783ea9f1E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h05d32a6eb1f1a762E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { "Move": { "local": 1, "projection": [] } }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hca02380bc74841bfE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he136e56e1a1dec08E", + "symbol_name": "_ZN10mutableRef4main17h93ec5d833ede8e5dE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ] + }, + "ty": 2, + "id": 10 } } } - ] - }, - "span": 17 - } - ], - "terminator": { + } + ] + }, + "span": 52 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 3, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] }, - "span": 15 + "span": 53 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 19 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 51 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, + { + "Use": { + "Copy": { + "local": 1, "projection": [] } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + } + ] }, - "span": 16 + "span": 55 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] + "targets": { + "branches": [ + [ + 32, + 2 + ] + ], + "otherwise": 3 + } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 + }, + { + "local": 1, + "projection": [] + } + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 22 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ] + }, + "ty": 2, + "id": 11 } } } - ] - }, - "span": 23 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + } + ] }, - { - "kind": { - "StorageDead": 2 + "span": 60 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } }, - "span": 27 + "targets": { + "branches": [ + [ + 22, + 4 + ] + ], + "otherwise": 5 + } } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } + }, + "args": [ { - "Field": [ - 0, - 7 - ] + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 13 + } + } } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 61 } - ], - "spread_arg": null, - "span": 3 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h8964be79673df687E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 12 + } + } + }, + "args": [ + { "Constant": { - "span": 43, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 14 } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } + } + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 66, + "mutability": "Not" + }, + { + "ty": 2, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 63, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "xref", + "source_info": { + "span": 66, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 67 + } } }, "details": null @@ -1801,290 +1918,153 @@ "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 + ] } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + ] }, "span": 43 } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h680150bf862ecf00E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 46 + "target": 1, + "unwind": { + "Cleanup": 3 + } } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 } - ], - "spread_arg": null, - "span": 49 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hca02380bc74841bfE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -2100,26 +2080,26 @@ } ], [ - 6, + 9, { "RigidTy": { - "Int": "Isize" + "Uint": "U8" } } ], [ - 16, + 6, { "RigidTy": { - "Int": "I32" + "Int": "Isize" } } ], [ - 9, + 16, { "RigidTy": { - "Uint": "U8" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state index 62b92a680..0ad6465cc 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state +++ b/kmir/src/tests/integration/data/exec-smir/references/mutableRef.state @@ -30,28 +30,28 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) - ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 22 , 8 , true ) , ty ( 2 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityMut ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 69 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 32 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 3 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x16" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 11 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 60 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 22 , basicBlockIdx ( 4 ) ) .Branches , otherwise: basicBlockIdx ( 5 ) ) ) , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 13 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 61 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 12 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 55 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 63 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "xref" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 67 ) ) ) ) .Map @@ -65,5 +65,4 @@ ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) ty ( 16 ) |-> rigidTyInt ( intTyI32 ) - - + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json index 917211b8f..25e36621b 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.smir.json @@ -43,21 +43,9 @@ ], "functions": [ [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E" - } - ], - [ - 31, - { - "NoOpSym": "" - } - ], - [ - 26, + 25, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN8refAsArg1f17h5a492bff7ee056a4E" } ], [ @@ -67,9 +55,9 @@ } ], [ - 13, + 0, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ @@ -79,15 +67,21 @@ } ], [ - 25, + 23, { - "NormalSym": "_ZN8refAsArg1f17h5a492bff7ee056a4E" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E" } ], [ - 0, + 13, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E" + } + ], + [ + 34, + { + "NoOpSym": "" } ], [ @@ -101,1744 +95,1730 @@ { "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE" } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E", + "symbol_name": "_ZN3std2rt10lang_start17hb0648255f9b804cbE", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ { - "Mut": { - "kind": "Default" + "Copy": { + "local": 1, + "projection": [] } - }, - { - "local": 1, - "projection": [] } ] - } - ] - }, - "span": 43 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 0, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": { - "Cleanup": 3 + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] } - } + ] }, - "span": 43 + "span": 2 } - }, - { - "statements": [], - "terminator": { + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { "kind": { - "Drop": { - "place": { - "local": 1, + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] }, - "target": 2, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - "span": 43 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN8refAsArg4main17h0353e8a47bed147aE", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 - } + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 } } } - ] - }, - "span": 52 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 53 + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 55 } }, - { - "statements": [], - "terminator": { + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN8refAsArg4main17h0353e8a47bed147aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 - } - } + "Assign": [ + { + "local": 1, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 52, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 42 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 12 + "ty": 2, + "id": 10 } } } - ], - "destination": { - "local": 5, + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] }, - "target": null, - "unwind": "Continue" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] }, - "span": 56 + "span": 53 } - } - ], - "locals": [ - { - "ty": 1, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 58, - "mutability": "Not" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Not" - }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 58, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": null + "span": 51 } - ], - "spread_arg": null, - "span": 60 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, + "Assign": [ + { + "local": 4, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] }, - "span": 43 + "span": 54 } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 56 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h466a9b165e00f7ddE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha7f47f8c8c89670eE", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha32a634bcd37a55dE", + "symbol_name": "_ZN8refAsArg1f17h5a492bff7ee056a4E", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] } } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + } + ] + }, + "span": 62 } + ], + "terminator": { + "kind": "Return", + "span": 61 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 2, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "y", + "source_info": { + "span": 64, + "scope": 0 }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - ] + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 65 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17hb0648255f9b804cbE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 16 + }, + { + "kind": { + "StorageLive": 3 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 15 + }, + { + "kind": { + "StorageLive": 4 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } ] - ] + } } - ] - }, - "span": 3 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 } - ] + } }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] } - ] + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 2 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 15 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageDead": 4 }, - "span": 1 + "span": 19 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + } }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN8refAsArg1f17h5a492bff7ee056a4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 62 - } - ], - "terminator": { - "kind": "Return", - "span": 61 - } - } - ], - "locals": [ - { - "ty": 2, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "y", - "source_info": { - "span": 64, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "target": 2, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 16 } - ], - "spread_arg": null, - "span": 65 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageDead": 3 }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 21 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 + "span": 22 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + { + "kind": { + "StorageLive": 6 + }, + "span": 23 }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb11b6a9b578c8caaE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Move": { - "local": 1, + { + "Use": { + "Copy": { + "local": 2, "projection": [ - "Deref" + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } ] } - }, - { - "Move": { - "local": 2, - "projection": [] - } } - ], - "destination": { + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] }, - "span": 43 + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h466a9b165e00f7ddE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hea1f574e8e1c5ce2E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h4ef4dd508588d0c3E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, + "args": [ + { + "Move": { + "local": 1, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { "Constant": { - "span": 14, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 19 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { "Constant": { - "span": 18, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 14, - "id": 2 + "ty": 1, + "id": 4 } } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf4760b65b4a102d7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + ] + } + ] }, - "span": 16 + "span": 43 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + } }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] }, - "span": 27 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 20 - } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb11b6a9b578c8caaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "Field": [ - 0, - 7 - ] + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 3 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -1846,19 +1826,13 @@ ], "types": [ [ - 2, + 6, { "RigidTy": { - "Int": "I8" + "Int": "Isize" } } ], - [ - 29, - { - "RigidTy": "Bool" - } - ], [ 16, { @@ -1868,20 +1842,26 @@ } ], [ - 6, + 9, { "RigidTy": { - "Int": "Isize" + "Uint": "U8" } } ], [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } + ], + [ + 29, + { + "RigidTy": "Bool" + } ] ], "debug": null diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state index 298d04c3e..d1a910bb1 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg.state @@ -28,25 +28,25 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 61 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 63 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 64 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 64 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 65 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json index b1465fb81..d9dfaae97 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.smir.json @@ -43,15 +43,9 @@ ], "functions": [ [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E" - } - ], - [ - 21, + 20, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE" + "IntrinsicSym": "black_box" } ], [ @@ -61,15 +55,15 @@ } ], [ - 0, + 26, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 25, + 21, { - "NormalSym": "_ZN9refAsArg21f17h3824ba4b7ccb016dE" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE" } ], [ @@ -79,15 +73,21 @@ } ], [ - 20, + 25, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN9refAsArg21f17h3824ba4b7ccb016dE" } ], [ - 26, + 14, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E" } ], [ @@ -103,1478 +103,1421 @@ } ], [ - 19, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hd928bd1477e89e88E", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } } }, "details": null }, { - "symbol_name": "_ZN9refAsArg21g17h9b15e23b800227b9E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E", "mono_item_kind": { "MonoItemFn": { - "name": "g", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } - } - ] + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } }, - "span": 68 - } - ], - "terminator": { - "kind": "Return", - "span": 67 - } - } - ], - "locals": [ - { - "ty": 2, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 70, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 71 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hd928bd1477e89e88E", "mono_item_kind": { "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" ] } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 43 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { "Constant": { - "span": 43, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 23, - "id": 7 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN9refAsArg24main17hb3acdb099b5ffc5aE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - } + ] } } - ] - }, - "span": 52 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 53 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 15 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageDead": 4 }, - "span": 51 + "span": 19 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - ] + } }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { + "args": [ + { "Move": { - "local": 4, + "local": 3, "projection": [] } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 } - } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 55 - } - }, - { - "statements": [], - "terminator": { + "span": 21 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, - "ty": 27, - "id": 12 - } + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { - "local": 5, + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, "projection": [] }, - "target": null, - "unwind": "Continue" - } + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 }, - "span": 56 + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "locals": [ - { - "ty": 1, - "span": 57, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "ty": 2, - "span": 58, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } }, - { - "ty": 2, - "span": 59, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 28, - "span": 53, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 }, - { - "ty": 30, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 58, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 60 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7adb6e7a526710c2E", + "symbol_name": "_ZN9refAsArg21g17h9b15e23b800227b9E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "g", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 68 } + ], + "terminator": { + "kind": "Return", + "span": 67 } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + } + ], + "locals": [ + { + "ty": 2, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 70, + "scope": 0 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h3f415fb1ec534b7eE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 71 + } } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h83e2448e9a19c29cE", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h22e262686085d5cfE", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, "projection": [] } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + ] + } + ] }, - "span": 33 + "span": 43 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Unreachable" + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] } }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" } }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" } }, - "argument_index": 1 + "span": 43 } - ], - "spread_arg": null, - "span": 42 - } - ] + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha3e899695dde1a12E", + "symbol_name": "_ZN9refAsArg21f17h3824ba4b7ccb016dE", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 46 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 } - ], - "spread_arg": null, - "span": 49 - } - ] + } + ], + "locals": [ + { + "ty": 2, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 66 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8448858603157be7E", + "symbol_name": "_ZN9refAsArg24main17hb3acdb099b5ffc5aE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" } - ] + }, + "ty": 2, + "id": 10 } } } - ] - }, - "span": 17 - } - ], - "terminator": { + } + ] + }, + "span": 52 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 3, "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + ] + } + ] }, - "span": 16 + "span": 53 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + "args": [ + { + "Copy": { + "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { "Copy": { "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] } } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + ] + } + ] }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 54 } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ 0, - 7 + 3 ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] + ], + "otherwise": 2 + } } }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN9refAsArg21f17h3824ba4b7ccb016dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 55 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { "Constant": { - "span": 61, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 13 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 62 + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 56 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 58, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } - } - ], - "locals": [ - { - "ty": 2, - "span": 64, - "mutability": "Mut" }, - { - "ty": 28, - "span": 65, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 66 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null @@ -1585,356 +1528,391 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + }, + [ { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 + } ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 5, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 1 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 6, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 6 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" + "scope": 0 }, - { - "ty": 8, - "span": 11, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 9, - "span": 12, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h3f415fb1ec534b7eE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "spread_arg": null, - "span": 13 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null @@ -1942,10 +1920,10 @@ ], "types": [ [ - 2, + 9, { "RigidTy": { - "Int": "I8" + "Uint": "U8" } } ], @@ -1972,10 +1950,10 @@ } ], [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state index 8e72e0025..3efc8ebed 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refAsArg2.state @@ -28,26 +28,26 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 65 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 66 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 68 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 67 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 2 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 55 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 56 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 57 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json index 15fb2e973..4e7ec8790 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.smir.json @@ -43,33 +43,27 @@ ], "functions": [ [ - 25, - { - "NormalSym": "_ZN11refReturned1f17hec238a45891f1867E" - } - ], - [ - 23, + 13, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE" } ], [ - 0, + 25, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN11refReturned1f17hec238a45891f1867E" } ], [ - 21, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E" } ], [ - 26, + 20, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "IntrinsicSym": "black_box" } ], [ @@ -79,21 +73,21 @@ } ], [ - 19, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ - 13, + 19, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E" } ], [ - 20, + 21, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE" } ], [ @@ -107,692 +101,1066 @@ { "NoOpSym": "" } + ], + [ + 26, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - }, - { - "local": 1, - "projection": [] - } - ] + ] + } } - ] + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 43 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 15 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - }, - { - "Move": { + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { "local": 2, - "projection": [] + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": { - "Cleanup": 3 + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] } - } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 24 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageDead": 6 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - }, - "span": 43 + ] } }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN11refReturned4main17haf3da80612a1db31E", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { "local": 1, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 10 - } - } + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ] + } }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + "args": [ + { "Constant": { - "span": 50, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 3, - "projection": [] + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 54 + "target": 2, + "unwind": "Unreachable" } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } - } - }, - "span": 54 + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 56 + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } } }, - { - "statements": [], - "terminator": { + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 26, - "id": 11 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 46, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 27, - "id": 12 + "ty": 17, + "id": 8 } } } - ], - "destination": { - "local": 6, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 57 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 1, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 60, - "mutability": "Not" - }, - { - "ty": 28, - "span": 53, - "mutability": "Not" - }, - { - "ty": 2, - "span": 61, - "mutability": "Not" - }, - { - "ty": 29, - "span": 54, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "ty": 30, - "span": 57, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 59, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": null + } }, - { - "name": "y", - "source_info": { - "span": 60, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned1f17hec238a45891f1867E", + "mono_item_kind": { + "MonoItemFn": { + "name": "f", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 31, + "id": 13 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": null + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 28, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 67, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 67, + "scope": 0 }, - { - "name": "z", - "source_info": { - "span": 61, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h2966f97234df1366E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "spread_arg": null, - "span": 62 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN11refReturned1f17hec238a45891f1867E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h846842672bb5af8aE", "mono_item_kind": { "MonoItemFn": { - "name": "f", - "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 31, - "id": 13 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Copy": { + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, "projection": [] } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] } - ], - "destination": { - "local": 0, - "projection": [] }, - "target": 1, - "unwind": "Continue" + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 28, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 67, - "mutability": "Not" + } + }, + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 67, - "scope": 0 + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - ], - "spread_arg": null, - "span": 68 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h54c9713c41194453E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "name": ">::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN11refReturned1g17h1f19f83ec6e6cf29E", + "mono_item_kind": { + "MonoItemFn": { + "name": "g", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { - "Move": { + { + "Use": { + "Copy": { "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, "projection": [] } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "span": 70 } + ], + "terminator": { + "kind": "Return", + "span": 69 } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 28, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 72, + "scope": 0 }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 73 + } } }, "details": null @@ -803,1177 +1171,787 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, + "Assign": [ + { + "local": 8, "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ + { + "Aggregate": [ + { + "Closure": [ + 1, + [ { - "Downcast": 0 + "Type": 1 }, { - "Field": [ - 0, - 6 - ] + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + ] + ] + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } + "span": 3 }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17ha1267726f5f8f3ecE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 1, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + ] + } + ] }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { + "span": 2 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN11refReturned1g17h1f19f83ec6e6cf29E", - "mono_item_kind": { - "MonoItemFn": { - "name": "g", - "id": 8, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { "Copy": { - "local": 1, + "local": 7, "projection": [] } - } - } - ] - }, - "span": 70 - } - ], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 28, - "span": 71, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 72, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 73 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h2966f97234df1366E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h210142d804738649E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + }, + 5 + ] + } + ] }, - "span": 15 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } + "args": [ + { + "Move": { + "local": 6, + "projection": [] } }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + { + "Move": { + "local": 2, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + { + "Move": { + "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } + }, + { + "Move": { + "local": 4, + "projection": [] } - ] + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] } - }, - 16 - ] + ] + } } - ] - }, - "span": 24 + } + ] }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h345c503c41db42c8E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h54c9713c41194453E", "mono_item_kind": { "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + } + ], + "destination": { + "local": 0, + "projection": [] }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 43 } - ], - "spread_arg": null, - "span": 49 - } - ] + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17haa13172991f024e8E", + "symbol_name": "_ZN11refReturned4main17haf3da80612a1db31E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 3, "projection": [] } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [], - "destination": { - "local": 0, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] }, - "span": 43 + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 26, + "id": 11 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 27, + "id": 12 + } + } + } + ], + "destination": { + "local": 6, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 57 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 60, + "mutability": "Not" + }, + { + "ty": 28, + "span": 53, + "mutability": "Not" + }, + { + "ty": 2, + "span": 61, + "mutability": "Not" + }, + { + "ty": 29, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 57, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 59, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 60, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 61, + "scope": 3 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 62 + } } }, "details": null @@ -1981,40 +1959,40 @@ ], "types": [ [ - 29, + 6, { - "RigidTy": "Bool" + "RigidTy": { + "Int": "Isize" + } } ], [ - 16, + 29, { - "RigidTy": { - "Int": "I32" - } + "RigidTy": "Bool" } ], [ - 2, + 9, { "RigidTy": { - "Int": "I8" + "Uint": "U8" } } ], [ - 9, + 2, { "RigidTy": { - "Uint": "U8" + "Int": "I8" } } ], [ - 6, + 16, { "RigidTy": { - "Int": "Isize" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state index 8ffbb7679..2eee4c407 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/refReturned.state +++ b/kmir/src/tests/integration/data/exec-smir/references/refReturned.state @@ -28,27 +28,27 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 30 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 30 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) - ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "f" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 31 ) , id: mirConstId ( 13 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 65 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ty ( 31 ) |-> monoItemFn (... name: symbol ( "g" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 69 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 28 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 72 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 72 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 73 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 10 ) ) ) ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands , destination: place (... local: local ( 6 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 57 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 60 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 53 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 61 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 57 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 60 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 61 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 62 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json index d0219c989..8e9ce0e20 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.smir.json @@ -43,33 +43,33 @@ ], "functions": [ [ - 20, + 21, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E" } ], [ - 19, + 25, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 21, + 23, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E" } ], [ - 13, + 20, { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E" + "IntrinsicSym": "black_box" } ], [ - 30, + 0, { - "NoOpSym": "" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ @@ -79,1683 +79,1665 @@ } ], [ - 0, + 30, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NoOpSym": "" } ], [ - 25, + 19, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E" } ], [ - 23, + 13, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E" + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0e8fcda8fbc4c3b7E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E", "mono_item_kind": { "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, "projection": [] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + ] + } + ] }, "span": 43 } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] }, - "span": 46 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 45 - } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" } }, - "argument_index": 1 + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - ], - "spread_arg": null, - "span": 49 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E", + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E", "mono_item_kind": { "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { + { + "Use": { + "Copy": { "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + } + ] }, - "span": 33 + "span": 17 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": 1 + "span": 15 } - ], - "spread_arg": null, - "span": 42 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h48f8e3454bc8caf9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 43 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 16 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } + "StorageDead": 3 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 21 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageLive": 5 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 22 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, + "Assign": [ + { + "local": 5, "projection": [] }, - "target": 4, - "unwind": "Terminate" - } + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] }, - "span": 43 + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null }, { - "symbol_name": "_ZN6simple4main17hcc17a5a2c5cebe39E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E", "mono_item_kind": { "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 9 - } - } - } - } - ] - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - } - ] + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 3, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] + "args": [], + "destination": { + "local": 0, + "projection": [] }, - "span": 50 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 50 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 54 - } - }, - { - "statements": [], - "terminator": { + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h88aed98570a5b1edE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 10 - } - } + "Assign": [ + { + "local": 0, + "projection": [] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 46, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, 0 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 26, - "id": 11 + "ty": 17, + "id": 8 } } } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } + } + ] }, - "span": 55 + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 1, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 2, - "span": 57, - "mutability": "Not" - }, - { - "ty": 27, - "span": 58, - "mutability": "Not" - }, - { - "ty": 2, - "span": 59, - "mutability": "Not" - }, - { - "ty": 28, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 55, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "x", - "source_info": { - "span": 57, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 }, - { - "name": "y", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": null + } }, - { - "name": "z", - "source_info": { - "span": 59, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8b592859fcbe523aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "spread_arg": null, - "span": 60 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h90e44d4a27e4eac4E", + "symbol_name": "_ZN6simple4main17hcc17a5a2c5cebe39E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 + } + } } + } + ] + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] }, - "args": [], - "destination": { - "local": 0, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + } + ] }, - "span": 43 + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 3, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 50 } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 50 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 10 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 55 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 2, + "span": 57, + "mutability": "Not" + }, + { + "ty": 27, + "span": 58, + "mutability": "Not" + }, + { + "ty": 2, + "span": 59, + "mutability": "Not" + }, + { + "ty": 28, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 55, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "x", + "source_info": { + "span": 57, + "scope": 1 }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" }, - { - "ty": 7, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "y", + "source_info": { + "span": 58, + "scope": 2 }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "z", + "source_info": { + "span": 59, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 60 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17he2c0086e06ec6623E", + "symbol_name": "_ZN3std2rt10lang_start17hc7c2da63cbb13d2eE", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ { - "Field": [ - 0, - 7 - ] + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { + ] + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 3, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 15 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } + "args": [ + { + "Move": { + "local": 6, + "projection": [] } }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } + { + "Move": { + "local": 2, + "projection": [] } - ], - "destination": { - "local": 2, - "projection": [] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] + { + "Move": { + "local": 3, + "projection": [] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + }, + { + "Move": { + "local": 4, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } } - ] + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] } - }, - 16 - ] + ] + } } - ] - }, - "span": 24 + } + ] }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "span": 7 + }, + { + "kind": { + "StorageDead": 5 }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null }, { - "symbol_name": "_ZN3std2rt10lang_start17hc7c2da63cbb13d2eE", + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h8d22806b1cabdad0E", "mono_item_kind": { "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 } - ] + } }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + "args": [ + { + "Move": { + "local": 1, "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { + }, + { "Constant": { - "span": 0, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 0, - "id": 0 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 7 + "target": 2, + "unwind": "Unreachable" } - ], - "terminator": { - "kind": "Return", - "span": 4 - } + }, + "span": 35 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 4 + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8b592859fcbe523aE", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0e8fcda8fbc4c3b7E", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -1763,10 +1745,10 @@ ], "types": [ [ - 16, + 2, { "RigidTy": { - "Int": "I32" + "Int": "I8" } } ], @@ -1793,10 +1775,10 @@ } ], [ - 2, + 16, { "RigidTy": { - "Int": "I8" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/simple.state b/kmir/src/tests/integration/data/exec-smir/references/simple.state index 8fcbeaeb2..760bb9fc5 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/simple.state +++ b/kmir/src/tests/integration/data/exec-smir/references/simple.state @@ -27,24 +27,24 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 27 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityNot ) , ty ( 27 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 42 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 52 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) ) ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 50 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 5 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 55 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 2 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 59 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 28 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 55 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "x" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "y" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "z" ) , sourceInfo: sourceInfo (... span: span ( 59 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 60 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json index 742906ea4..f19b57050 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.smir.json @@ -3,7 +3,7 @@ "crate_id": 16077360951361859512, "allocs": [ [ - 9, + 8, { "Memory": { "bytes": [ @@ -28,18 +28,12 @@ 97, 46, 97, - 95, + 110, + 111, 116, 104, - 105, - 114, - 100, - 32, - 61, - 61, - 32, - 52, - 51 + 101, + 114 ], "provenance": { "ptrs": [] @@ -90,7 +84,7 @@ } ], [ - 6, + 5, { "Memory": { "bytes": [ @@ -126,7 +120,7 @@ 61, 32, 52, - 51 + 50 ], "provenance": { "ptrs": [] @@ -137,7 +131,7 @@ } ], [ - 5, + 9, { "Memory": { "bytes": [ @@ -163,17 +157,17 @@ 46, 97, 95, - 118, - 97, - 108, - 117, - 101, + 116, + 104, + 105, + 114, + 100, 32, 61, 61, 32, 52, - 50 + 51 ], "provenance": { "ptrs": [] @@ -184,7 +178,7 @@ } ], [ - 8, + 6, { "Memory": { "bytes": [ @@ -209,12 +203,18 @@ 97, 46, 97, - 110, - 111, - 116, - 104, + 95, + 118, + 97, + 108, + 117, 101, - 114 + 32, + 61, + 61, + 32, + 52, + 51 ], "provenance": { "ptrs": [] @@ -227,9 +227,9 @@ ], "functions": [ [ - 21, + 0, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE" + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" } ], [ @@ -239,229 +239,140 @@ } ], [ - 23, + 20, { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E" + "IntrinsicSym": "black_box" } ], [ - 27, + 14, { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E" } ], [ - 44, + 23, { - "NoOpSym": "" + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hfef9e5a4b8fedb26E" } ], [ - 19, + 44, { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E" + "NoOpSym": "" } ], [ - 0, + 21, { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE" } ], [ - 14, + 27, { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E" + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" } ], [ - 20, + 19, { - "IntrinsicSym": "black_box" + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E" } ] ], "uneval_consts": [], "items": [ { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ea78c58d6db9c2E", + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E", "mono_item_kind": { "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h7c13163714402654E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 } } } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + } + ] + }, + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - ] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } } }, "details": null @@ -472,1496 +383,1494 @@ "MonoItemFn": { "name": "main", "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Aggregate": [ + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ - { - "Constant": { - "span": 51, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 9 - } - } - }, - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 10 - } - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 32, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 2, + "id": 9 } } - ] - ] - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" }, { - "Mut": { - "kind": "Default" + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 10 + } } }, { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 } - ] + } } ] - } - ] - }, - "span": 55 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 56, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 12 - } + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } + }, + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 2 + ] + } + ] } - } - ] - }, - "span": 57 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 58 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 42, - 1 - ] - ], - "otherwise": 2 - } - } - }, - "span": 50 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - ] - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 5, - "projection": [] - } - ] - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 20, - "projection": [] - }, - { - "CopyForDeref": { - "local": 6, - "projection": [ - "Deref" - ] - } - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 20, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 43 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 2, - "id": 13 - } - } - } - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 43, - 3 - ] - ], - "otherwise": 4 - } - } - }, - "span": 59 - } - }, - { - "statements": [], - "terminator": { + "span": 55 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 65, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 - } - } + "Assign": [ + { + "local": 2, + "projection": [ + "Deref" + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 56, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 42 ], "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 28, - "id": 15 + "ty": 2, + "id": 12 } } } - ], - "destination": { - "local": 4, + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 3, "projection": [] }, - "target": null, - "unwind": "Continue" - } - }, - "span": 65 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 67 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 8, - 0, - [ - { - "Lifetime": { - "kind": "ReErased" - } - } - ], - null, - null - ] - }, - [ + { + "Use": { + "Copy": { + "local": 1, + "projection": [ { - "Copy": { - "local": 10, - "projection": [] - } + "Field": [ + 0, + 2 + ] } ] - ] + } } - ] - }, - "span": 68 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 9, - "projection": [] - } - ] - } - ] + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } }, - "span": 69 - }, - { - "kind": { - "Assign": [ - { - "local": 21, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, + "targets": { + "branches": [ + [ + 42, + 1 + ] + ], + "otherwise": 2 + } + } + }, + "span": 50 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, "projection": [ - "Deref", { "Field": [ 0, - 29 + 2 ] } ] } - } - ] - }, - "span": 70 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 21, - "projection": [ - "Deref", - { - "Field": [ - 0, - 2 - ] - } - ] + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } + }, + { + "local": 5, + "projection": [] } - } - ] - }, - "span": 70 - } - ], - "terminator": { + ] + } + ] + }, + "span": 61 + }, + { "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 12, - "projection": [] - } + "Assign": [ + { + "local": 20, + "projection": [] }, - "targets": { - "branches": [ - [ - 43, - 5 + { + "CopyForDeref": { + "local": 6, + "projection": [ + "Deref" ] - ], - "otherwise": 6 + } } - } + ] }, - "span": 66 - } - }, - { - "statements": [], - "terminator": { + "span": 62 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 71, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 - } - } + "Assign": [ + { + "local": 20, + "projection": [ + "Deref" + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 63, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 43 ], "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 28, - "id": 16 + "ty": 2, + "id": 13 } } } - ], - "destination": { - "local": 8, + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 7, "projection": [] }, - "target": null, - "unwind": "Continue" - } - }, - "span": 71 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, + { + "Use": { + "Copy": { + "local": 1, "projection": [ - "Deref", { "Field": [ 0, - 29 + 2 ] } ] } } - ] - }, - "span": 73 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [ - "Deref", - { - "Field": [ - 1, - 25 - ] - } - ] - }, - { - "Use": { - "Constant": { - "span": 74, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 17 - } - } - } + "span": 64 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 3 + ] + ], + "otherwise": 4 + } + } + }, + "span": 59 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 65, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 } - ] + } }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 23, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ 0, - 29 - ] + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" } - ] + }, + "ty": 28, + "id": 15 } } - ] + } + ], + "destination": { + "local": 4, + "projection": [] }, - "span": 75 + "target": null, + "unwind": "Continue" + } + }, + "span": 65 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, + "span": 67 + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 8, + 0, + [ + { + "Lifetime": { + "kind": "ReErased" + } + } + ], + null, + null + ] + }, + [ { - "Mut": { - "kind": "Default" + "Copy": { + "local": 10, + "projection": [] } - }, + } + ] + ] + } + ] + }, + "span": 68 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 9, + "projection": [] + } + ] + } + ] + }, + "span": 69 + }, + { + "kind": { + "Assign": [ + { + "local": 21, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", { - "local": 23, - "projection": [ - "Deref", - { - "Field": [ - 2, - 26 - ] - } + "Field": [ + 0, + 29 ] } ] } - ] - }, - "span": 75 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 24, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, + "span": 70 + }, + { + "kind": { + "Assign": [ + { + "local": 12, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 21, "projection": [ "Deref", { "Field": [ 0, - 29 + 2 ] } ] } } - ] - }, - "span": 76 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 24, - "projection": [ - "Deref", - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] + "span": 70 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 12, + "projection": [] + } }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [ - "Deref" - ] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 15, - "projection": [] - } - }, - 26 - ] + "targets": { + "branches": [ + [ + 43, + 5 + ] + ], + "otherwise": 6 + } + } + }, + "span": 66 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 71, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 } - ] + } }, - "span": 77 - }, - { - "kind": { - "Assign": [ - { - "local": 16, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 25 + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] ] - } - ] - } + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 16 } } - ] + } + ], + "destination": { + "local": 8, + "projection": [] }, - "span": 72 + "target": null, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 71 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 16, - "projection": [] - } + "Assign": [ + { + "local": 22, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 8 + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } ] - ], - "otherwise": 7 + } } - } + ] }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { + "span": 73 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + "Assign": [ + { + "local": 22, + "projection": [ + "Deref", + { + "Field": [ + 1, + 25 + ] } - } + ] }, - "args": [ - { + { + "Use": { "Constant": { - "span": 32, + "span": 74, "user_ty": null, "const_": { "kind": { "Allocated": { "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 + 1 ], "provenance": { - "ptrs": [ - [ - 0, - 2 - ] - ] + "ptrs": [] }, - "align": 8, + "align": 1, "mutability": "Mut" } }, - "ty": 28, - "id": 18 + "ty": 25, + "id": 17 } } } - ], - "destination": { - "local": 13, + } + ] + }, + "span": 73 + }, + { + "kind": { + "Assign": [ + { + "local": 23, "projection": [] }, - "target": null, - "unwind": "Continue" - } - }, - "span": 78 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 18, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 26 - ] - } + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 ] } - } + ] } - ] - }, - "span": 80 - } - ], - "terminator": { + } + ] + }, + "span": 75 + }, + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 18, - "projection": [] - } + "Assign": [ + { + "local": 14, + "projection": [] }, - "targets": { - "branches": [ - [ - 43, - 9 + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 23, + "projection": [ + "Deref", + { + "Field": [ + 2, + 26 + ] + } + ] + } + ] + } + ] + }, + "span": 75 + }, + { + "kind": { + "Assign": [ + { + "local": 24, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 29 + ] + } ] - ], - "otherwise": 10 + } } - } + ] }, - "span": 79 - } - }, - { - "statements": [], - "terminator": { + "span": 76 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 81, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 24, + "projection": [ + "Deref", + { + "Field": [ + 0, + 2 + ] + } + ] } } + } + ] + }, + "span": 76 + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [ + "Deref" + ] }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 27, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 3 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 19 + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 15, + "projection": [] } + }, + 26 + ] + } + ] + }, + "span": 77 + }, + { + "kind": { + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] } } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 16, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 8 + ] ], - "destination": { - "local": 17, + "otherwise": 7 + } + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 2 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 18 + } + } + } + ], + "destination": { + "local": 13, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 78 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 18, "projection": [] }, - "target": null, - "unwind": "Continue" - } + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 26 + ] + } + ] + } + } + } + ] }, - "span": 81 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 82 + "span": 80 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 18, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 9 + ] + ], + "otherwise": 10 + } + } + }, + "span": 79 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 81, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { "Constant": { - "span": 83, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 14 + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 3 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 19 } } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 4 - ] + } + ], + "destination": { + "local": 17, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 81 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 82 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 14 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 4 ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 20 - } + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 20 } } - ], - "destination": { - "local": 19, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 83 - } + } + ], + "destination": { + "local": 19, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 83 } - ], - "locals": [ - { - "ty": 1, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 30, + } + ], + "locals": [ + { + "ty": 1, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 85, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 86, + "mutability": "Not" + }, + { + "ty": 2, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 87, + "mutability": "Mut" + }, + { + "ty": 33, + "span": 88, + "mutability": "Not" + }, + { + "ty": 2, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 71, + "mutability": "Mut" + }, + { + "ty": 34, + "span": 89, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 67, + "mutability": "Mut" + }, + { + "ty": 35, + "span": 90, + "mutability": "Not" + }, + { + "ty": 2, + "span": 91, + "mutability": "Not" + }, + { + "ty": 32, + "span": 78, + "mutability": "Mut" + }, + { + "ty": 36, + "span": 92, + "mutability": "Not" + }, + { + "ty": 2, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 25, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 32, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 31, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 90, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { "span": 85, - "mutability": "Mut" + "scope": 1 }, - { - "ty": 31, - "span": 86, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 2, - "span": 58, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "r1", + "source_info": { + "span": 86, + "scope": 2 }, - { - "ty": 32, - "span": 65, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 31, + "argument_index": null + }, + { + "name": "r1", + "source_info": { "span": 87, - "mutability": "Mut" + "scope": 3 }, - { - "ty": 33, - "span": 88, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "ty": 2, - "span": 64, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "r2", + "source_info": { + "span": 88, + "scope": 4 }, - { - "ty": 32, - "span": 71, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 6, + "projection": [] + } }, - { - "ty": 34, + "argument_index": null + }, + { + "name": "e", + "source_info": { "span": 89, - "mutability": "Mut" + "scope": 5 }, - { - "ty": 29, - "span": 67, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 9, + "projection": [] + } }, - { - "ty": 35, + "argument_index": null + }, + { + "name": "ee", + "source_info": { "span": 90, - "mutability": "Not" + "scope": 6 + }, + "composite": null, + "value": { + "Place": { + "local": 11, + "projection": [] + } }, - { - "ty": 2, + "argument_index": null + }, + { + "name": "vv", + "source_info": { "span": 91, - "mutability": "Not" + "scope": 7 }, - { - "ty": 32, - "span": 78, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 12, + "projection": [] + } }, - { - "ty": 36, + "argument_index": null + }, + { + "name": "r3", + "source_info": { "span": 92, - "mutability": "Not" - }, - { - "ty": 2, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 25, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 32, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 31, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 90, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 85, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "r1", - "source_info": { - "span": 86, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "r1", - "source_info": { - "span": 87, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null + "scope": 8 }, - { - "name": "r2", - "source_info": { - "span": 88, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 6, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "e", - "source_info": { - "span": 89, - "scope": 5 - }, - "composite": null, - "value": { - "Place": { - "local": 9, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "ee", - "source_info": { - "span": 90, - "scope": 6 - }, - "composite": null, - "value": { - "Place": { - "local": 11, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "vv", - "source_info": { - "span": 91, - "scope": 7 - }, - "composite": null, - "value": { - "Place": { - "local": 12, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 14, + "projection": [] + } }, - { - "name": "r3", - "source_info": { - "span": 92, - "scope": 8 - }, - "composite": null, - "value": { - "Place": { - "local": 14, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 93 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 93 + } } }, "details": null @@ -1972,356 +1881,419 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + }, + [ { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 + } ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 5, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 1 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 6, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 6 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" + "scope": 0 }, - { - "ty": 9, - "span": 12, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } }, - "argument_index": null + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "spread_arg": null, - "span": 13 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -2332,518 +2304,357 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>::{closure#0}", "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { + "span": 16 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + "StorageLive": 3 }, "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + } + ] }, - "span": 16 + "span": 17 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + "args": [ + { + "Move": { + "local": 4, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 + } + ], + "destination": { + "local": 3, + "projection": [] }, - "span": 23 + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 } - ] + } }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 27 + "target": 2, + "unwind": "Continue" } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + }, + "span": 16 } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } ] } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + }, + "span": 22 }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "kind": { + "StorageLive": 6 + }, + "span": 23 }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } + "Assign": [ + { + "local": 6, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { + { + "Use": { + "Copy": { "local": 2, - "projection": [] + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] } } - ], - "destination": { + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { "local": 0, "projection": [] }, - "target": 1, - "unwind": { - "Cleanup": 3 + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] } - } + ] }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 24 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageDead": 6 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { + "span": 25 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } + "StorageDead": 5 }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } }, - { - "ty": 12, - "span": 43, - "mutability": "Not" + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null @@ -2854,283 +2665,454 @@ "MonoItemFn": { "name": "std::sys::backtrace::__rust_begin_short_backtrace::", "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { "Constant": { - "span": 31, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 19, - "id": 3 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + } + }, + "args": [ + { "Constant": { - "span": 34, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { "span": 38, - "mutability": "Not" + "scope": 0 }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h65a2c197bce21f15E", + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7b723e01cb78ea2dE", "mono_item_kind": { "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null }, { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17ha84526f71506a832E", + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hc2ea78c58d6db9c2E", "mono_item_kind": { "MonoItemFn": { - "name": ">::call_once", + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { "Move": { "local": 1, - "projection": [] + "projection": [ + "Deref" + ] } }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h65a2c197bce21f15E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null @@ -3138,56 +3120,56 @@ ], "types": [ [ - 16, + 41, { "RigidTy": { - "Int": "I32" + "Uint": "U32" } } ], [ - 6, + 25, { - "RigidTy": { - "Int": "Isize" - } + "RigidTy": "Bool" } ], [ - 2, + 9, { "RigidTy": { - "Int": "I8" + "Uint": "U8" } } ], [ - 9, + 26, { "RigidTy": { - "Uint": "U8" + "Uint": "Usize" } } ], [ - 26, + 6, { "RigidTy": { - "Uint": "Usize" + "Int": "Isize" } } ], [ - 25, + 2, { - "RigidTy": "Bool" + "RigidTy": { + "Int": "I8" + } } ], [ - 41, + 16, { "RigidTy": { - "Uint": "U32" + "Int": "I32" } } ] diff --git a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state index 5b683d8de..67d5e6749 100644 --- a/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state +++ b/kmir/src/tests/integration/data/exec-smir/references/weirdRefs.state @@ -35,45 +35,45 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 43 , 64 , false ) , ty ( 26 ) , mutabilityMut ) ) ) , ty ( 30 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 43 , 64 , false ) , ty ( 26 ) , mutabilityMut ) ) ) , ty ( 30 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 33 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 5 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 33 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) ) , ty ( 34 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 35 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 36 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) ) , ty ( 34 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 9 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 35 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 43 , 8 , true ) , ty ( 2 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 36 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 32 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 32 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) , mutabilityMut ) , ty ( 31 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) + ListItem ( typedValue ( Reference ( 0 , place (... local: local ( 1 ) , projection: .ProjectionElems ) , mutabilityMut ) , ty ( 29 ) , mutabilityMut ) ) .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" " , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b" \x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"*" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 12 ) ) ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 42 , basicBlockIdx ( 1 ) ) .Branches , otherwise: basicBlockIdx ( 2 ) ) ) , span: span ( 50 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 5 ) , projection: .ProjectionElems ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 6 ) , projection: projectionElemDeref .ProjectionElems ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 20 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"+" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 2 ) , id: mirConstId ( 13 ) ) ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 64 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 59 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 65 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 15 ) ) ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 65 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 67 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 8 ) , variantIdx ( 0 ) , genericArgKindLifetime ( region (... kind: regionKindReErased ) ) .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandCopy ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 68 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 9 ) , projection: .ProjectionElems ) ) ) , span: span ( 69 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 21 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 70 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 12 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 21 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 70 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 6 ) ) ) , span: span ( 66 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 71 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 1 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 16 ) ) ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 71 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 22 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 74 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 17 ) ) ) ) ) ) , span: span ( 73 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 23 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 23 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) , span: span ( 75 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 24 ) , projection: .ProjectionElems ) , rvalue: rvalueCopyForDeref ( place (... local: local ( 11 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 29 ) ) .ProjectionElems ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 15 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 24 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 2 ) ) .ProjectionElems ) ) ) ) , span: span ( 76 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 14 ) , projection: projectionElemDeref .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 15 ) , projection: .ProjectionElems ) ) , ty ( 26 ) ) ) , span: span ( 77 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 16 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 16 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 8 ) ) .Branches , otherwise: basicBlockIdx ( 7 ) ) ) , span: span ( 72 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 78 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 2 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 18 ) ) ) ) .Operands , destination: place (... local: local ( 13 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 78 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 18 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 80 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 18 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 43 , basicBlockIdx ( 9 ) ) .Branches , otherwise: basicBlockIdx ( 10 ) ) ) , span: span ( 79 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 81 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 3 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 19 ) ) ) ) .Operands , destination: place (... local: local ( 17 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 81 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 82 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 27 ) , id: mirConstId ( 14 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00!\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 4 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 28 ) , id: mirConstId ( 20 ) ) ) ) .Operands , destination: place (... local: local ( 19 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionContinue ) , span: span ( 83 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 84 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 30 ) , span: span ( 85 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 86 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 87 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 33 ) , span: span ( 88 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 71 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 34 ) , span: span ( 89 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 35 ) , span: span ( 90 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 91 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 32 ) , span: span ( 78 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 36 ) , span: span ( 92 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 2 ) , span: span ( 76 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 25 ) , span: span ( 72 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 81 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 32 ) , span: span ( 83 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 31 ) , span: span ( 88 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 90 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 85 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 86 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r1" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 3 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r2" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 4 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "e" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 5 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "ee" ) , sourceInfo: sourceInfo (... span: span ( 90 ) , scope: sourceScope ( 6 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "vv" ) , sourceInfo: sourceInfo (... span: span ( 91 ) , scope: sourceScope ( 7 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 12 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "r3" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 8 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 14 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 93 ) ) ) ) .Map @@ -90,5 +90,4 @@ ty ( 26 ) |-> rigidTyUint ( uintTyUsize ) ty ( 41 ) |-> rigidTyUint ( uintTyU32 ) - - + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json index ce1206711..9b47e0ca3 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.smir.json @@ -1 +1,1895 @@ -{"name":"struct_field_update","crate_id":10235230017850619163,"allocs":[],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E"}],[23,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h018b8394ba015d86E"}],[21,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE"}],[20,{"IntrinsicSym":"black_box"}],[32,{"NoOpSym":""}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start17h7596bfce4c2de521E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":43}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":23,"id":7}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":43}},{"statements":[],"terminator":{"kind":"Resume","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":12,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"},{"ty":24,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":46,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":8}}}}]},"span":46}],"terminator":{"kind":"Return","span":45}}],"locals":[{"ty":17,"span":47,"mutability":"Mut"},{"ty":1,"span":48,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":48,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":49}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":43,"mutability":"Mut"},{"ty":7,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN19struct_field_update4main17h502cdc578af7c9e8E","mono_item_kind":{"MonoItemFn":{"name":"main","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Aggregate":["Tuple",[{"Constant":{"span":51,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":9}}},{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[2,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":10}}}]]}]},"span":53},{"kind":{"Assign":[{"local":1,"projection":[]},{"Aggregate":[{"Adt":[7,0,[],null,null]},[{"Constant":{"span":54,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[10,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":16,"id":11}}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":25,"id":12}}},{"Constant":{"span":56,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,36,64],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":13}}},{"Move":{"local":2,"projection":[]}}]]}]},"span":57},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[1,25]}]},{"Use":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[1],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":25,"id":14}}}}]},"span":59},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[{"Field":[0,16]}]}}}]},"span":60},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[3,27]},{"Field":[1,16]}]},{"Use":{"Move":{"local":3,"projection":[]}}}]},"span":61},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":[{"Field":[3,27]},{"Field":[0,16]}]}}}]},"span":62},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[0,16]}]},{"Use":{"Move":{"local":4,"projection":[]}}}]},"span":63},{"kind":{"Assign":[{"local":1,"projection":[{"Field":[2,26]}]},{"Use":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[51,51,51,51,51,115,69,64],"provenance":{"ptrs":[]},"align":8,"mutability":"Mut"}},"ty":26,"id":15}}}}]},"span":65}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":1,"span":66,"mutability":"Mut"},{"ty":28,"span":67,"mutability":"Mut"},{"ty":27,"span":53,"mutability":"Mut"},{"ty":16,"span":60,"mutability":"Mut"},{"ty":16,"span":62,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"s","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h09bc4ea8ad5997d5E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":43,"user_ty":null,"const_":{"kind":"ZeroSized","ty":21,"id":6}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":43}},{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":16,"span":43,"mutability":"Mut"},{"ty":22,"span":43,"mutability":"Not"},{"ty":1,"span":43,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":43}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h21cb4ff546418550E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":4,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":44}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"},{"ty":22,"span":44,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":44}]}},"details":null}],"types":[[16,{"RigidTy":{"Int":"I32"}}],[26,{"RigidTy":{"Float":"F64"}}],[25,{"RigidTy":"Bool"}],[2,{"RigidTy":{"Int":"I8"}}],[6,{"RigidTy":{"Int":"Isize"}}],[9,{"RigidTy":{"Uint":"U8"}}]],"debug":null} \ No newline at end of file +{ + "name": "struct_field_update", + "crate_id": 10235230017850619163, + "allocs": [], + "functions": [ + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E" + } + ], + [ + 32, + { + "NoOpSym": "" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h3f66b0239d77a98aE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h7596bfce4c2de521E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7353dbc165af6e0cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h91da9245de8630b4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN19struct_field_update4main17h502cdc578af7c9e8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Aggregate": [ + "Tuple", + [ + { + "Constant": { + "span": 51, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 9 + } + } + }, + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 2, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 10 + } + } + } + ] + ] + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 16, + "id": 11 + } + } + }, + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 12 + } + } + }, + { + "Constant": { + "span": 56, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 36, + 64 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 13 + } + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 25 + ] + } + ] + }, + { + "Use": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 14 + } + } + } + } + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 16 + ] + } + ] + } + } + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 3, + 27 + ] + }, + { + "Field": [ + 1, + 16 + ] + } + ] + }, + { + "Use": { + "Move": { + "local": 3, + "projection": [] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 3, + 27 + ] + }, + { + "Field": [ + 0, + 16 + ] + } + ] + } + } + } + ] + }, + "span": 62 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 16 + ] + } + ] + }, + { + "Use": { + "Move": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 63 + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 26 + ] + } + ] + }, + { + "Use": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 51, + 51, + 51, + 51, + 51, + 115, + 69, + 64 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 15 + } + } + } + } + ] + }, + "span": 65 + } + ], + "terminator": { + "kind": "Return", + "span": 50 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 67, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 53, + "mutability": "Mut" + }, + { + "ty": 16, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 16, + "span": 62, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h09bc4ea8ad5997d5E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h5675cbdc818cdcb9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h21cb4ff546418550E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hbb836054d8d1b867E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 26, + { + "RigidTy": { + "Float": "F64" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 25, + { + "RigidTy": "Bool" + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state index 59c8c4af0..db5f4e5c3 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/struct_field_update.state @@ -25,12 +25,12 @@ unwindActionUnreachable - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) ) , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 28 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 25 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 1 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityMut ) ) ) , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 28 ) , mutabilityMut ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) @@ -40,12 +40,12 @@ .List - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 51 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 9 ) ) ) ) operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x02\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) .Operands ) ) , span: span ( 53 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 12 ) ) ) ) operandConstant ( constOperand (... span: span ( 56 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 13 ) ) ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 25 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 14 ) ) ) ) ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 1 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 3 ) , ty ( 27 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 63 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 26 ) ) .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 64 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"33333sE@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 15 ) ) ) ) ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 53 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 62 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state index 8be197b47..3092d7d0d 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.84.state @@ -25,38 +25,38 @@ unwindActionContinue - ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) - ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( noValue ( ty ( 1 ) , mutabilityMut ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Aggregate ( ListItem ( typedLocal ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) - ListItem ( typedLocal ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) - ListItem ( typedLocal ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) ListItem ( Moved ) ListItem ( Moved ) ListItem ( Moved ) - ListItem ( noValue ( ty ( 1 ) , mutabilityNot ) ) - ListItem ( noValue ( ty ( 16 ) , mutabilityMut ) ) - ListItem ( noValue ( ty ( 26 ) , mutabilityMut ) ) - ListItem ( noValue ( ty ( 27 ) , mutabilityMut ) ) ) ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) - ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) .Bodies ) - ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) .Bodies ) - ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) .Bodies ) - ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) .Bodies ) - ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) .Bodies ) - ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) .Bodies ) + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) ) ) .Map diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state new file mode 100644 index 000000000..3092d7d0d --- /dev/null +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.90.state @@ -0,0 +1,75 @@ + + + #execTerminator ( terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ~> .K + + + noReturn + + + ty ( 25 ) + + + + ListItem ( basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) ) + + + ty ( -1 ) + + + place (... local: local ( 4 ) , projection: .ProjectionElems ) + + + someBasicBlockIdx ( basicBlockIdx ( 1 ) ) + + + unwindActionContinue + + + ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) + + + + ListItem ( StackFrame ( ty ( -1 ) , place (... local: local ( -1 ) , projection: .ProjectionElems ) , noBasicBlockIdx , unwindActionUnreachable , ListItem ( newLocal ( ty ( 1 ) , mutabilityMut ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 10 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( false ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityNot ) ) ) , ty ( 28 ) , mutabilityNot ) ) + ListItem ( typedValue ( Aggregate ( ListItem ( typedValue ( Integer ( 11 , 32 , true ) , ty ( 16 ) , mutabilityNot ) ) + ListItem ( typedValue ( BoolVal ( true ) , ty ( 26 ) , mutabilityNot ) ) + ListItem ( typedValue ( Any , ty ( 27 ) , mutabilityMut ) ) ) , ty ( 29 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( Moved ) + ListItem ( newLocal ( ty ( 1 ) , mutabilityNot ) ) + ListItem ( newLocal ( ty ( 16 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 26 ) , mutabilityMut ) ) + ListItem ( newLocal ( ty ( 27 ) , mutabilityMut ) ) ) ) + + + ty ( 13 ) |-> monoItemFn (... name: symbol ( "std::sys::backtrace::__rust_begin_short_backtrace::" ) , id: defId ( 2 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 31 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 19 ) , id: mirConstId ( 3 ) ) ) ) , args: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 33 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 34 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 20 ) , id: mirConstId ( 5 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 35 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 36 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 37 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 38 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 39 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "f" ) , sourceInfo: sourceInfo (... span: span ( 38 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "result" ) , sourceInfo: sourceInfo (... span: span ( 40 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "dummy" ) , sourceInfo: sourceInfo (... span: span ( 41 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 42 ) ) ) ) + ty ( 14 ) |-> monoItemFn (... name: symbol ( "<() as std::process::Termination>::report" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandConstant ( constOperand (... span: span ( 46 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 17 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 46 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 45 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 17 ) , span: span ( 47 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 48 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 48 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsConst ( constOperand (... span: span ( 32 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 1 ) , id: mirConstId ( 4 ) ) ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 49 ) ) ) ) + ty ( 19 ) |-> monoItemFn (... name: symbol ( ">::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandMove ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , args: .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 21 ) |-> monoItemFn (... name: symbol ( "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindMut (... kind: mutBorrowKindDefault ) , place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) , span: span ( 43 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 43 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionCleanup ( basicBlockIdx ( 3 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 2 ) , unwind: unwindActionContinue ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindDrop (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , target: basicBlockIdx ( 4 ) , unwind: unwindActionTerminate ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindResume , span: span ( 43 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 12 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 1 ) , span: span ( 43 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 43 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: .VarDebugInfos , spreadArg: someLocal ( local ( 2 ) ) , span: span ( 43 ) ) ) ) + ty ( 23 ) |-> monoItemFn (... name: symbol ( "std::rt::lang_start::<()>::{closure#0}" ) , id: defId ( 1 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 16 ) ) statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 15 ) ) statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 17 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) ) ) , span: span ( 17 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 14 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 13 ) , id: mirConstId ( 1 ) ) ) ) , args: operandMove ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 15 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 19 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 18 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 14 ) , id: mirConstId ( 2 ) ) ) ) , args: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 16 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 21 ) ) statement (... kind: statementKindStorageLive ( local ( 5 ) ) , span: span ( 22 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueRef ( region (... kind: regionKindReErased ) , borrowKindShared , place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) .ProjectionElems ) ) ) , span: span ( 22 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 15 ) ) projectionElemField ( fieldIdx ( 0 ) , ty ( 9 ) ) .ProjectionElems ) ) ) ) , span: span ( 23 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueCast ( castKindIntToInt , operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , ty ( 16 ) ) ) , span: span ( 24 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 25 ) ) statement (... kind: statementKindStorageDead ( local ( 5 ) ) , span: span ( 26 ) ) statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 27 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 20 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 16 ) , span: span ( 28 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 11 ) , span: span ( 3 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 17 ) , span: span ( 16 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 15 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 7 ) , span: span ( 17 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 18 ) , span: span ( 22 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 9 ) , span: span ( 23 ) , mut: mutabilityMut ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "main" ) , sourceInfo: sourceInfo (... span: span ( 9 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: projectionElemDeref projectionElemField ( fieldIdx ( 0 ) , ty ( 7 ) ) .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 29 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 30 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 3 ) ) ) ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "foo" ) , id: defId ( 8 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 73 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 74 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 16 ) , span: span ( 75 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 76 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 77 ) , mut: mutabilityNot ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "_i" ) , sourceInfo: sourceInfo (... span: span ( 75 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "_b" ) , sourceInfo: sourceInfo (... span: span ( 76 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "_f" ) , sourceInfo: sourceInfo (... span: span ( 77 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 78 ) ) ) ) + ty ( -1 ) |-> monoItemFn (... name: symbol ( "main" ) , id: defId ( 6 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 1 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindAdt ( adtDef ( 7 ) , variantIdx ( 0 ) , .GenericArgs , noUserTypeAnnotationIndex , noFieldIdx ) , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\n\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 10 ) ) ) ) operandConstant ( constOperand (... span: span ( 53 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) operandConstant ( constOperand (... span: span ( 54 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00$@" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 27 ) , id: mirConstId ( 12 ) ) ) ) .Operands ) ) , span: span ( 55 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueAggregate ( aggregateKindTuple , operandConstant ( constOperand (... span: span ( 57 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x0b\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 16 ) , id: mirConstId ( 13 ) ) ) ) operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x01" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 1 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 14 ) ) ) ) operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) .Operands ) ) , span: span ( 59 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 60 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 61 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 62 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 50 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 51 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 9 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 16 ) ) .ProjectionElems ) ) ) ) , span: span ( 65 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 10 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 26 ) ) .ProjectionElems ) ) ) ) , span: span ( 66 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 11 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: projectionElemField ( fieldIdx ( 2 ) , ty ( 27 ) ) .ProjectionElems ) ) ) ) , span: span ( 67 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 9 ) ) ) ) , args: operandMove ( place (... local: local ( 9 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 10 ) , projection: .ProjectionElems ) ) operandMove ( place (... local: local ( 11 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 8 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionContinue ) , span: span ( 64 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 68 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 28 ) , span: span ( 70 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 71 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 60 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 62 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 16 ) , span: span ( 65 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 66 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 67 ) , mut: mutabilityMut ) .LocalDecls , argCount: 0 , varDebugInfo: varDebugInfo (... name: symbol ( "s" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "t" ) , sourceInfo: sourceInfo (... span: span ( 71 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 72 ) ) ) ) + + + .Map + + + symbol ( "main" ) + + + ty ( 2 ) |-> rigidTyInt ( intTyI8 ) + ty ( 6 ) |-> rigidTyInt ( intTyIsize ) + ty ( 9 ) |-> rigidTyUint ( uintTyU8 ) + ty ( 16 ) |-> rigidTyInt ( intTyI32 ) + ty ( 26 ) |-> rigidTyBool + ty ( 27 ) |-> rigidTyFloat ( floatTyF64 ) + + \ No newline at end of file diff --git a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json index 2100e09fd..f04cd7ef4 100644 --- a/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json +++ b/kmir/src/tests/integration/data/exec-smir/structs-tuples/structs-tuples.smir.json @@ -1,2131 +1,2111 @@ { - "name": "struct_tuple_fields", - "crate_id": 15052015653515667555, - "allocs": [], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 25, - { - "NormalSym": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E" - } - ], - [ - 30, - { - "NoOpSym": "" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ] + "name": "structs_tuples", + "crate_id": 4825803685595141642, + "allocs": [], + "functions": [ + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE" + } ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h12e57977f213b84cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": [ + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE" + } + ], + [ + 25, + { + "NormalSym": "_ZN14structs_tuples3foo17h3890d1fc66f78799E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 33, + { + "NoOpSym": "" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h0fc835eb50e37b13E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } - ] + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN14structs_tuples3foo17h3890d1fc66f78799E", + "mono_item_kind": { + "MonoItemFn": { + "name": "foo", + "id": 8, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 73 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h13fdc527832fef9bE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": [ + } + ], + "locals": [ + { + "ty": 1, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 16, + "span": 75, + "mutability": "Not" + }, + { + "ty": 26, + "span": 76, + "mutability": "Not" + }, + { + "ty": 27, + "span": 77, + "mutability": "Not" + } + ], + "arg_count": 3, + "var_debug_info": [ + { + "name": "_i", + "source_info": { + "span": 75, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "_b", + "source_info": { + "span": 76, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "_f", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + } + ], + "spread_arg": null, + "span": 78 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h35bcf3f6dc6c431bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ { - "ty": 7, - "span": 43, - "mutability": "Not" + "Downcast": 0 }, { - "ty": 1, - "span": 43, - "mutability": "Not" + "Field": [ + 0, + 6 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h14ef065ef2b7c26fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": [ + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN14structs_tuples4main17hc13d6b1ad2ba5288E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + "local": 1, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 7, + 0, + [], + null, + null + ] + }, + [ + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 10, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { + "align": 4, + "mutability": "Mut" + } + }, "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" + "id": 10 + } } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + }, + { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + "ty": 26, + "id": 11 + } + } + }, + { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 36, + 64 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } }, - "argument_index": 1 + "ty": 27, + "id": 12 + } } - ], - "spread_arg": null, - "span": 3 + } + ] + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9fd74af38a279f31E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + ] + }, + "span": 55 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 27 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN19struct_tuple_fields4main17he368ec089685e92cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 7, - 0, - [], - null, - null - ] - }, - [ - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 10, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 10 - } - } - }, - { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } - } - }, - { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 36, - 64 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 27, - "id": 12 - } - } - } - ] - ] - } - ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 27 - ] - } - ] - } - } - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Aggregate": [ - "Tuple", - [ - { - "Constant": { - "span": 57, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 11, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 16, - "id": 13 - } - } - }, - { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 1 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 14 - } - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 2, - 27 - ] - } - ] - } - } - } - ] - }, - "span": 62 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 7, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 65 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 1, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 66 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 2, - 27 - ] - } - ] - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 9, - "projection": [] - } - }, - { - "Move": { - "local": 10, - "projection": [] - } - }, - { - "Move": { - "local": 11, - "projection": [] - } - } - ], - "destination": { - "local": 8, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "local": 2, + "projection": [] + }, + { + "Aggregate": [ + "Tuple", + [ + { + "Constant": { + "span": 57, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 11, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 68 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 28, - "span": 70, - "mutability": "Not" - }, - { - "ty": 29, - "span": 71, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 51, - "mutability": "Not" - }, - { - "ty": 16, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 62, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - }, - { + "align": 4, + "mutability": "Mut" + } + }, "ty": 16, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 66, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 67, - "mutability": "Mut" + "id": 13 + } } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "s", - "source_info": { - "span": 70, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "t", - "source_info": { - "span": 71, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + }, + { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 1 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } }, - "argument_index": null + "ty": 26, + "id": 14 + } } - ], - "spread_arg": null, - "span": 72 + }, + { + "Move": { + "local": 3, + "projection": [] + } + } + ] + ] } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h29c5f28db416dd9bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": [ + ] + }, + "span": 59 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 16 + ] } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 60 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 26 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 61 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 2, + 27 + ] } - ], - "spread_arg": null, - "span": 49 + ] + } + } } - ] + ] + }, + "span": 62 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 7, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hb280b8a231f5f9feE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": [ + }, + { + "statements": [ + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } + "local": 9, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 16 + ] } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" + ] + } + } + } + ] + }, + "span": 65 + }, + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 1, + 26 + ] } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 + ] + } + } + } + ] + }, + "span": 66 + }, + { + "kind": { + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 2, + 27 + ] } - ], - "spread_arg": null, - "span": 42 + ] + } + } } - ] + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 9, + "projection": [] + } + }, + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Move": { + "local": 11, + "projection": [] + } + } + ], + "destination": { + "local": 8, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 64 } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hb9b0e627f12f2913E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": [ + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 68 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 28, + "span": 70, + "mutability": "Not" + }, + { + "ty": 29, + "span": 71, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 51, + "mutability": "Not" + }, + { + "ty": 16, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 62, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + }, + { + "ty": 16, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 66, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 67, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "s", + "source_info": { + "span": 70, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "t", + "source_info": { + "span": 71, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h59dd244d53c82a21E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] } - ], - "spread_arg": null, - "span": 13 + ] + } + } } - ] + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 } - }, - "details": null - }, - { - "symbol_name": "_ZN19struct_tuple_fields3foo17h313cc5516683e5b2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "foo", - "id": 8, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 73 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 16, - "span": 75, - "mutability": "Not" - }, - { - "ty": 26, - "span": 76, - "mutability": "Not" - }, - { - "ty": 27, - "span": 77, - "mutability": "Not" - } - ], - "arg_count": 3, - "var_debug_info": [ - { - "name": "_i", - "source_info": { - "span": 75, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "_b", - "source_info": { - "span": 76, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "_f", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - } - ], - "spread_arg": null, - "span": 78 + "Move": { + "local": 3, + "projection": [] + } } - ] + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ea230cb4a81ac50E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": [ + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] }, { - "ty": 1, - "span": 43, - "mutability": "Not" + "Field": [ + 0, + 9 + ] } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 + ] + } + } } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h093a95c952625c6cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 } - }, - "details": null + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h7ec7f065d73fc35aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 } - } - ], - [ - 26, - { - "RigidTy": "Bool" - } - ], - [ - 27, - { - "RigidTy": { - "Float": "F64" + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 } - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h5da2e9c3f6fcbd9eE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha01f56bbeee4ceecE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hcc7804faa37550b8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + } + ], + "types": [ + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } ], - "debug": null -} \ No newline at end of file + [ + 27, + { + "RigidTy": { + "Float": "F64" + } + } + ], + [ + 26, + { + "RigidTy": "Bool" + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ] + ], + "debug": null +} diff --git a/kmir/src/tests/integration/data/proving/unchecked-add-spec.k b/kmir/src/tests/integration/data/proving/unchecked-add-spec.k new file mode 100644 index 000000000..f77039109 --- /dev/null +++ b/kmir/src/tests/integration/data/proving/unchecked-add-spec.k @@ -0,0 +1,75 @@ +module UNCHECKED-ADD-SPEC + imports KMIR + + claim [unchecked-ADD-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody (body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody (body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ) + + + requires // i16 invariants + 0 -Int (1 < None: +def test_prove_termination(test_data: tuple[str, Path], tmp_path: Path, kmir: KMIR) -> None: testname, smir_json = test_data spec_file = tmp_path / f'{testname}.k' gen_opts = GenSpecOpts(smir_json, spec_file, 'main') @@ -364,3 +365,23 @@ def test_prove(test_data: tuple[str, Path], tmp_path: Path, kmir: KMIR) -> None: for label in claim_labels: proof = Proof.read_proof_data(proof_dir, label) assert proof.passed + + +PROVING_DIR = (Path(__file__).parent / 'data' / 'proving').resolve(strict=True) +PROVING_FILES = list(PROVING_DIR.glob('*-spec.k')) + + +@pytest.mark.parametrize( + 'spec', + PROVING_FILES, + ids=[spec.stem for spec in PROVING_FILES], +) +def test_prove(spec: Path, tmp_path: Path, kmir: KMIR) -> None: + proof_dir = tmp_path / (spec.stem + 'proofs') + prove_opts = ProveRunOpts(spec, proof_dir, None, None) + _kmir_prove_run(prove_opts) + + claim_labels = kmir.get_claim_index(spec).labels() + for label in claim_labels: + proof = Proof.read_proof_data(proof_dir, label) + assert proof.passed From 293735d03203853e69c95c0d541b82f107310a5a Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Fri, 28 Mar 2025 13:14:16 +1100 Subject: [PATCH 21/84] adapt spec files to updated master --- .../maximum-proof/maximum-spec.k | 10 +++++----- .../unchecked_add/unchecked-op-spec.k | 12 ++++++------ .../unchecked_mul/unchecked-op-spec.k | 12 ++++++------ .../unchecked_neg/unchecked-op-spec.k | 10 +++++----- .../unchecked_shl/unchecked-op-spec.k | 12 ++++++------ .../unchecked_shr/unchecked-op-spec.k | 12 ++++++------ .../unchecked_sub/unchecked-op-spec.k | 12 ++++++------ 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/rust-verification-proofs/maximum-proof/maximum-spec.k b/rust-verification-proofs/maximum-proof/maximum-spec.k index 97f8a00ce..ee506eb8f 100644 --- a/rust-verification-proofs/maximum-proof/maximum-spec.k +++ b/rust-verification-proofs/maximum-proof/maximum-spec.k @@ -47,18 +47,18 @@ module MAXIMUM-SPEC _ => ?_ ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 64 , false ) , ty ( 26 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 64 , false ) , ty ( 26 ) , _ ) ) - ListItem ( typedLocal ( Integer ( C , 64 , false ) , ty ( 26 ) , _ ) ) + ListItem ( typedValue ( Integer ( A , 64 , false ) , ty ( 26 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 64 , false ) , ty ( 26 ) , _ ) ) + ListItem ( typedValue ( Integer ( C , 64 , false ) , ty ( 26 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 64, false), ty ( 26 ) , ?_ )) + ListItem ( typedValue ( Integer ( ?RESULT, 64, false), ty ( 26 ) , ?_ )) ?_ _ => ?_ - ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) .Bodies ) + ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) requires // invariant of the `Integer` constructor diff --git a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k index 5f234168d..cc8f79d0c 100644 --- a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k +++ b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k @@ -46,20 +46,20 @@ module UNCHECKED-OP-SPEC _ => ?_ ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) ?_ _ => ?_ ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) ) diff --git a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k index b2063d81f..5e13f0298 100644 --- a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k +++ b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k @@ -46,20 +46,20 @@ module UNCHECKED-OP-SPEC _ => ?_ ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) ?_ _ => ?_ ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) ) requires // i16 invariants diff --git a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k index ef6ab8bd4..6716fe2fb 100644 --- a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k +++ b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k @@ -46,19 +46,19 @@ module UNCHECKED-OP-SPEC ListItem ( _ ) ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) ?_ _ => ?_ ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) .Bodies ) + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) ) requires // i16 invariants diff --git a/rust-verification-proofs/unchecked_shl/unchecked-op-spec.k b/rust-verification-proofs/unchecked_shl/unchecked-op-spec.k index 9d0327efd..062335a3b 100644 --- a/rust-verification-proofs/unchecked_shl/unchecked-op-spec.k +++ b/rust-verification-proofs/unchecked_shl/unchecked-op-spec.k @@ -47,20 +47,20 @@ module UNCHECKED-OP-SPEC ListItem ( _ ) ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) ?_ _ => ?_ ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) ) requires // i16 invariants diff --git a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k index 3d57d7110..88c672c3c 100644 --- a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k +++ b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k @@ -47,20 +47,20 @@ module UNCHECKED-OP-SPEC ListItem ( _ ) ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) ?_ _ => ?_ ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) .Bodies ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) .Bodies ) + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) ) requires // i16 invariants diff --git a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k index 5c550daad..4730bf3a4 100644 --- a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k +++ b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k @@ -46,20 +46,20 @@ module UNCHECKED-OP-SPEC _ => ?_ ListItem ( _ ) - ListItem ( typedLocal ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedLocal ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) // _ // if we keep this we need a lemma for list size predicate simplification => - ListItem ( typedLocal ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) ?_ _ => ?_ ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) .Bodies ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) .Bodies ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) .Bodies ) + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) ) requires // i16 invariants From f109657703164fc3d4cbdedec284431541c4199e Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Fri, 28 Mar 2025 14:28:53 +1100 Subject: [PATCH 22/84] format and adjust json files, adjust README --- rust-verification-proofs/README.md | 11 +- .../maximum-proof/main-max-with-lt.smir.json | 4218 ++++++++--------- .../unchecked_add/unchecked-add.smir.json | 2970 +++++++++++- .../unchecked_mul/unchecked-mul.smir.json | 2970 +++++++++++- .../unchecked_neg/unchecked-neg.smir.json | 2340 ++++++++- .../unchecked_shl/unchecked-shl.smir.json | 2354 ++++++++- .../unchecked_shr/unchecked-shr.smir.json | 2354 ++++++++- .../unchecked_sub/unchecked-sub.smir.json | 2970 +++++++++++- 8 files changed, 18053 insertions(+), 2134 deletions(-) diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md index 59118277f..25ed9b099 100644 --- a/rust-verification-proofs/README.md +++ b/rust-verification-proofs/README.md @@ -56,7 +56,7 @@ fn maximum(a: usize, b: usize, c: usize) -> usize { Notice in this case that `a`, `b`, and `c` are concrete, fixed values. To turn the parameters of `maximum` into symbolic variables, we can obtain the representation of the function call to `maximum` executed using KMIR and then replace the concrete values of these variables with symbolic values. Furthermore, the assertion specified in the code can be manually translated as a requirement that should be met by the symbolic variables, meaning that any value that they can assume must respect the conditions contained in the specification. Following this approach, we can utilize KMIR to give us formal proof that, for any valid `isize` input, the maximum value among the three parameters will be returned. -Information on how the specification was created can be found in the [here](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). +Information on how the specification was created can be found in the longer [description of `maximum-proof`](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). To run this proof in your terminal from this folder, execute: @@ -92,11 +92,4 @@ cd $METHOD_NAME poetry -C ../../kmir/ run -- kmir prove run $PWD/unchecked-op-spec.k --proof-dir $PWD/proof ``` -Currently, we expect the execution of the unsafe arithmetic proofs to manifest an unpredicted behavior and end its execution prior to providing the proof's result. This behavior is being investigated and should be addressed soon. - - - - - - - +The proof for `unchecked_add` is expected to work as described. Currently, we expect some of the other unsafe arithmetic proofs to manifest unpredicted behavior and end its execution prior to providing the proof's result. This behavior is due to an unfinished implementation of the operations under test and will be addressed in due course. diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json index 07869653d..02182bb8e 100644 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json @@ -197,359 +197,357 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>::{closure#0}", "id": 1, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 + "span": 16 + }, + { + "kind": { + "StorageLive": 3 }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + "span": 15 + }, + { + "kind": { + "StorageLive": 4 }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { + "span": 17 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] } } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } + } + ] }, - "span": 15 + "span": 17 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } }, - "span": 19 + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 15 + } + }, + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } + "StorageDead": 4 }, - "span": 16 + "span": 19 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, + "args": [ + { + "Move": { + "local": 3, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] } - ] + } + ], + "destination": { + "local": 2, + "projection": [] }, - "span": 22 + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 + "span": 21 + }, + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] } - } - ] - }, - "span": 23 + ] + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] } - }, - 16 - ] + ] + } } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + } + ] }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 + "span": 23 }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 ] } ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } + }, + "span": 24 }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 + { + "kind": { + "StorageDead": 6 + }, + "span": 25 }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } + { + "kind": { + "StorageDead": 5 + }, + "span": 26 }, - "argument_index": 1 + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 } - ], - "spread_arg": null, - "span": 3 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } } }, "details": null @@ -560,63 +558,61 @@ "MonoItemFn": { "name": ">::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -627,356 +623,354 @@ "MonoItemFn": { "name": "std::rt::lang_start::<()>", "id": 0, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 + "span": 1 + }, + { + "kind": { + "StorageLive": 6 }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "span": 2 + }, + { + "kind": { + "StorageLive": 8 }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 } - } + ] ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + }, + [ { "Copy": { - "local": 7, + "local": 1, "projection": [] } - }, - 5 + } ] - } - ] - }, - "span": 2 - } - ], - "terminator": { + ] + } + ] + }, + "span": 3 + }, + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, "projection": [] } - } - ], - "destination": { - "local": 5, + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, - "target": 1, - "unwind": "Continue" - } + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] }, - "span": 1 + "span": 2 } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, + "args": [ + { + "Move": { + "local": 6, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } } - ] + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] }, - "span": 6 + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 } + ], + "terminator": { + "kind": "Return", + "span": 4 } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" + "scope": 0 }, - { - "ty": 9, - "span": 12, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 11, - "span": 2, - "mutability": "Not" + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } } }, "details": null @@ -987,377 +981,375 @@ "MonoItemFn": { "name": "maximum", "id": 7, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } + "Assign": [ + { + "local": 5, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 69 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { + { + "BinaryOp": [ + "Lt", + { "Copy": { - "local": 2, + "local": 1, "projection": [] } - } - } - ] - }, - "span": 71 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } - }, - "span": 70 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { + }, + { "Copy": { - "local": 1, + "local": 2, "projection": [] } } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } + ] + } + ] }, - "span": 70 + "span": 69 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 69 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] } } - ] - }, - "span": 74 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 7, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 73 + "span": 71 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 } - ], - "terminator": { + }, + "span": 70 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } + "Assign": [ + { + "local": 4, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 4 + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } } - } + ] }, - "span": 73 + "span": 72 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 70 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 7, + "projection": [] + } + }, + { "Copy": { "local": 3, "projection": [] } } - } - ] + ] + } + ] + }, + "span": 73 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } }, - "span": 76 + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 + } } - ], - "terminator": { + }, + "span": 73 + } + }, + { + "statements": [ + { "kind": { - "Goto": { - "target": 6 - } - }, - "span": 75 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 3, + "projection": [] } } - ] - }, - "span": 77 + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 } - ], - "terminator": { + }, + "span": 75 + } + }, + { + "statements": [ + { "kind": { - "Goto": { - "target": 6 - } + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] }, - "span": 75 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 + "span": 77 } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 75 } - ], - "locals": [ - { - "ty": 26, - "span": 79, - "mutability": "Mut" - }, - { - "ty": 26, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 + } + } + ], + "locals": [ + { + "ty": 26, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 80, + "mutability": "Not" + }, + { + "ty": 26, + "span": 81, + "mutability": "Not" + }, + { + "ty": 26, + "span": 82, + "mutability": "Not" + }, + { + "ty": 26, + "span": 83, + "mutability": "Not" + }, + { + "ty": 29, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 74, + "mutability": "Mut" + } + ], + "arg_count": 3, + "var_debug_info": [ + { + "name": "a", + "source_info": { "span": 80, - "mutability": "Not" - }, - { - "ty": 26, - "span": 81, - "mutability": "Not" + "scope": 0 }, - { - "ty": 26, - "span": 82, - "mutability": "Not" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 26, - "span": 83, - "mutability": "Not" + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 0 }, - { - "ty": 29, - "span": 69, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 29, - "span": 73, - "mutability": "Mut" + "argument_index": 2 + }, + { + "name": "c", + "source_info": { + "span": 82, + "scope": 0 }, - { - "ty": 26, - "span": 74, - "mutability": "Mut" - } - ], - "arg_count": 3, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 + "argument_index": 3 + }, + { + "name": "max_ab", + "source_info": { + "span": 83, + "scope": 1 }, - { - "name": "c", - "source_info": { - "span": 82, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "max_ab", - "source_info": { - "span": 83, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 84 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } } }, "details": null @@ -1368,874 +1360,870 @@ "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } + "Assign": [ + { + "local": 3, + "projection": [] }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, "projection": [] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 + ] } - } + ] }, "span": 43 } - }, - { - "statements": [], - "terminator": { + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { "kind": { - "Drop": { - "place": { + "Assign": [ + { "local": 1, "projection": [] }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { "kind": { - "Drop": { - "place": { - "local": 1, + "Assign": [ + { + "local": 2, "projection": [] }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] - } - }, - "details": null - }, - { - "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 10 - } + { + "Use": { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 22, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 } } } - ] - }, - "span": 52 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 22, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 12 } } } - ] - }, - "span": 53 + } + ] }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 12 - } - } - } + "span": 54 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 } - ] + } }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } + "args": [ + { + "Copy": { + "local": 1, + "projection": [] } }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } + { + "Copy": { + "local": 2, + "projection": [] } - ], - "destination": { - "local": 4, - "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, + { + "Copy": { + "local": 3, "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] } - ] + } + ], + "destination": { + "local": 4, + "projection": [] }, - "span": 55 + "target": 1, + "unwind": "Continue" } - ], - "terminator": { + }, + "span": 51 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } + "Assign": [ + { + "local": 5, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 2 + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] } - } + ] }, "span": 55 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } }, - "span": 56 + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 2 + } } - ], - "terminator": { + }, + "span": 55 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } + "Assign": [ + { + "local": 6, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 3 + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] } - } + ] }, "span": 56 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } }, - "span": 57 + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 3 + } } - ], - "terminator": { + }, + "span": 56 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } + "Assign": [ + { + "local": 7, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 4 + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] } - } + ] }, "span": 57 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } }, - "span": 58 + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 4 + } } - ], - "terminator": { + }, + "span": 57 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 8, - "projection": [] - } + "Assign": [ + { + "local": 8, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 8 + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] } - } + ] }, "span": 58 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 8, + "projection": [] + } }, - "span": 59 + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 8 + } } - ], - "terminator": { + }, + "span": 58 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 9, - "projection": [] - } + "Assign": [ + { + "local": 9, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 8 + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] } - } + ] }, "span": 59 } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 9, + "projection": [] + } }, - "span": 60 + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 8 + } } - ], - "terminator": { + }, + "span": 59 + } + }, + { + "statements": [ + { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 10, - "projection": [] - } + "Assign": [ + { + "local": 10, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 8 + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] } - } + ] }, "span": 60 } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 10, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 8 + } + } + }, + "span": 60 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 13 + } + } + }, + "args": [ + { "Constant": { - "span": 61, + "span": 32, "user_ty": null, "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 13 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 110, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 14 - } + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 14 } } - ], - "destination": { - "local": 11, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 - } + } + ], + "destination": { + "local": 11, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 61 } - ], - "locals": [ - { - "ty": 1, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 26, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 64, + "mutability": "Not" + }, + { + "ty": 26, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 66, + "mutability": "Not" + }, + { + "ty": 26, + "span": 67, + "mutability": "Not" + }, + { + "ty": 29, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 59, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 61, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { "span": 64, - "mutability": "Not" - }, - { - "ty": 26, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 66, - "mutability": "Not" - }, - { - "ty": 26, - "span": 67, - "mutability": "Not" - }, - { - "ty": 29, - "span": 55, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 56, - "mutability": "Mut" + "scope": 1 }, - { - "ty": 29, - "span": 57, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "ty": 29, - "span": 58, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 65, + "scope": 2 }, - { - "ty": 29, - "span": 59, - "mutability": "Mut" + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } }, - { - "ty": 29, - "span": 60, - "mutability": "Mut" + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 66, + "scope": 3 }, - { - "ty": 30, - "span": 61, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 64, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } }, - { - "name": "b", - "source_info": { - "span": 65, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 67, + "scope": 4 }, - { - "name": "c", - "source_info": { - "span": 66, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } }, - { - "name": "result", - "source_info": { - "span": 67, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - ] + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } } }, "details": null @@ -2246,177 +2234,175 @@ "MonoItemFn": { "name": "std::sys::backtrace::__rust_begin_short_backtrace::", "id": 2, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { "Constant": { - "span": 31, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 19, - "id": 3 + "ty": 1, + "id": 4 } } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { + } + }, + "args": [ + { "Constant": { - "span": 34, + "span": 32, "user_ty": null, "const_": { "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "ty": 1, + "id": 4 } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { "span": 38, - "mutability": "Not" + "scope": 0 }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - ] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } } }, "details": null @@ -2427,35 +2413,33 @@ "MonoItemFn": { "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", "id": 4, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - ] + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } } }, "details": null @@ -2466,83 +2450,81 @@ "MonoItemFn": { "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", "id": 3, - "body": [ - { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] } - ], - "destination": { - "local": 0, - "projection": [] }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - ] + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } } }, "details": null @@ -2553,92 +2535,90 @@ "MonoItemFn": { "name": "<() as std::process::Termination>::report", "id": 5, - "body": [ - { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 } } } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 + } + ] + }, + "span": 46 } + ], + "terminator": { + "kind": "Return", + "span": 45 } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - ] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } } }, "details": null diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json index d98f99eae..922645c86 100644 --- a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json +++ b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json @@ -1 +1,2969 @@ -{"name":"unchecked_add","crate_id":1100512358528492573,"allocs":[[2,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,97,100,100,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,43,32,98,32,60,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,43,32,98,32,62,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E"}],[35,{"NoOpSym":""}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[32,{"NormalSym":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha7140c6faa1714efE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN13unchecked_add4main17hd8e1c5b7245124d4E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Add",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_add","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["AddUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[6,{"RigidTy":{"Int":"Isize"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}]],"debug":null} \ No newline at end of file +{ + "name": "unchecked_add", + "crate_id": 1100512358528492573, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 97, + 100, + 100, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 40, + 97, + 32, + 43, + 32, + 98, + 32, + 60, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 65, + 88, + 41, + 32, + 38, + 38, + 32, + 40, + 97, + 32, + 43, + 32, + 98, + 32, + 62, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 73, + 78, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E" + } + ], + [ + 35, + { + "NoOpSym": "" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE" + } + ], + [ + 24, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + }, + { + "ty": 31, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17ha7140c6faa1714efE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 70 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 11 + } + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": "Return", + "span": 71 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 74, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 74, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 75 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 93, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 96, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 97, + "mutability": "Not" + }, + { + "ty": 23, + "span": 98, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 97, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 98, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_sum", + "source_info": { + "span": 99, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 8 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 62, + "mutability": "Not" + }, + { + "ty": 23, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_add4main17hd8e1c5b7245124d4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 13 + } + } + } + } + ] + }, + "span": 78 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 213, + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 76, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 12 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 80 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Constant": { + "span": 82, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255, + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 15 + } + } + } + ] + } + ] + }, + "span": 81 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 3 + } + } + }, + "span": 81 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 83 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 83 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + ] + } + ] + }, + "span": 84 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 5 + } + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 86 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 87, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 58, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 18 + } + } + } + ], + "destination": { + "local": 10, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 87 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 89, + "mutability": "Not" + }, + { + "ty": 23, + "span": 90, + "mutability": "Not" + }, + { + "ty": 23, + "span": 91, + "mutability": "Not" + }, + { + "ty": 21, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 87, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 90, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 91, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 92 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "AddUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 23, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json index 2d32d0103..854f39e8c 100644 --- a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json +++ b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json @@ -1 +1,2969 @@ -{"name":"unchecked_mul","crate_id":5290701492876642493,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,42,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,42,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,109,117,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E"}],[32,{"NormalSym":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE"}],[36,{"NoOpSym":""}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[20,{"IntrinsicSym":"black_box"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_mul4main17h0cc64cae78556d0bE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["MulUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hfdc6fe355496207dE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_mul::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Mul",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null}],"types":[[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[9,{"RigidTy":{"Uint":"U8"}}],[21,{"RigidTy":"Bool"}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file +{ + "name": "unchecked_mul", + "crate_id": 5290701492876642493, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 40, + 97, + 32, + 42, + 32, + 98, + 32, + 62, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 65, + 88, + 41, + 32, + 38, + 38, + 32, + 40, + 97, + 32, + 42, + 32, + 98, + 32, + 60, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 73, + 78, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 109, + 117, + 108, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 24, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE" + } + ], + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN13unchecked_mul4main17h0cc64cae78556d0bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 13 + } + } + } + } + ] + }, + "span": 78 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 213, + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 76, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 12 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 80 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Constant": { + "span": 82, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255, + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 15 + } + } + } + ] + } + ] + }, + "span": 81 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 3 + } + } + }, + "span": 81 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 83 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 83 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + ] + } + ] + }, + "span": 84 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 5 + } + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 86 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 87, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 58, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 18 + } + } + } + ], + "destination": { + "local": 10, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 87 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 89, + "mutability": "Not" + }, + { + "ty": 23, + "span": 90, + "mutability": "Not" + }, + { + "ty": 23, + "span": 91, + "mutability": "Not" + }, + { + "ty": 21, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 87, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 90, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 91, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 92 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + }, + { + "ty": 31, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 93, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 96, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 97, + "mutability": "Not" + }, + { + "ty": 23, + "span": 98, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 97, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 98, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 99, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 11 + } + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": "Return", + "span": 71 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 74, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 74, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 75 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_mul", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "MulUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 23, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 70 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hfdc6fe355496207dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_mul::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 8 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 62, + "mutability": "Not" + }, + { + "ty": 23, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + } + ], + "types": [ + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json index ec557301f..a97297a9a 100644 --- a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json +++ b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json @@ -1 +1,2339 @@ -{"name":"unchecked_neg","crate_id":8515610171801290459,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,110,101,103,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E"}],[32,{"NormalSym":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE"}],[24,{"IntrinsicSym":"cold_path"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[20,{"IntrinsicSym":"black_box"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":46},{"kind":{"Assign":[{"local":2,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":47}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":46}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":48,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":49}},{"statements":[{"kind":{"StorageDead":2},"span":51},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Constant":{"span":52,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":7}}},{"Copy":{"local":1,"projection":[]}}]}]},"span":53}],"terminator":{"kind":"Return","span":50}}],"locals":[{"ty":23,"span":54,"mutability":"Mut"},{"ty":23,"span":55,"mutability":"Not"},{"ty":21,"span":46,"mutability":"Mut"},{"ty":1,"span":49,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":55,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":56}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":14}}}}]},"span":75}],"terminator":{"kind":"Return","span":74}}],"locals":[{"ty":17,"span":76,"mutability":"Mut"},{"ty":1,"span":77,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":77,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":78}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg4main17h279e62d4b439df5fE","mono_item_kind":{"MonoItemFn":{"name":"main","id":9,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}}]},"span":82}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":15}}},"args":[{"Move":{"local":2,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":80}},{"statements":[],"terminator":{"kind":"Return","span":83}}],"locals":[{"ty":1,"span":84,"mutability":"Mut"},{"ty":23,"span":85,"mutability":"Not"},{"ty":23,"span":82,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":86,"scope":1},"composite":null,"value":{"Const":{"span":81,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}},"argument_index":null},{"name":"result","source_info":{"span":85,"scope":2},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":87}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":72}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":13}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":72}},{"statements":[],"terminator":{"kind":"Resume","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":12,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"},{"ty":31,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_neg::precondition_check","id":5,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":58},{"kind":{"Assign":[{"local":3,"projection":[]},{"BinaryOp":["Eq",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":8}}}]}]},"span":58}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":3,"projection":[]}},"targets":{"branches":[[0,3]],"otherwise":1}}},"span":57}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":9}}},"args":[],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":61}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":62,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":10}}},"args":[{"Constant":{"span":63,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":11}}}],"destination":{"local":2,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":64}},{"statements":[{"kind":{"StorageDead":3},"span":65}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":1,"span":67,"mutability":"Mut"},{"ty":23,"span":68,"mutability":"Not"},{"ty":27,"span":64,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Mut"},{"ty":1,"span":61,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"lhs","source_info":{"span":68,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":69,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":70,"scope":2},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":71}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":12}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":16,"span":72,"mutability":"Mut"},{"ty":29,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":72}}],"locals":[{"ty":1,"span":72,"mutability":"Mut"},{"ty":7,"span":72,"mutability":"Not"},{"ty":1,"span":72,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":72}]}},"details":null},{"symbol_name":"_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":10,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":88,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Copy":{"local":1,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":89}},{"statements":[],"terminator":{"kind":"Return","span":90}}],"locals":[{"ty":23,"span":91,"mutability":"Mut"},{"ty":23,"span":92,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"a","source_info":{"span":92,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"unchecked_res","source_info":{"span":93,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":94}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE","mono_item_kind":{"MonoItemFn":{"name":"std::intrinsics::cold_path","id":3,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":43}}],"locals":[{"ty":1,"span":44,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[],"spread_arg":null,"span":45}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":7,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":73}}],"locals":[{"ty":1,"span":73,"mutability":"Mut"},{"ty":29,"span":73,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":73}]}},"details":null}],"types":[[9,{"RigidTy":{"Uint":"U8"}}],[2,{"RigidTy":{"Int":"I8"}}],[21,{"RigidTy":"Bool"}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file +{ + "name": "unchecked_neg", + "crate_id": 8515610171801290459, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 110, + 101, + 103, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E" + } + ], + [ + 25, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE" + } + ], + [ + 24, + { + "IntrinsicSym": "cold_path" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_neg", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 46 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 47 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 46 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 48, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 49 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 2 + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 7 + } + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": "Return", + "span": 50 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 55, + "mutability": "Not" + }, + { + "ty": 21, + "span": 46, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 49, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 55, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 56 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 14 + } + } + } + } + ] + }, + "span": 75 + } + ], + "terminator": { + "kind": "Return", + "span": 74 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 77, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 78 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_neg4main17h279e62d4b439df5fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 9, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 81, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + } + ] + }, + "span": 82 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 15 + } + } + }, + "args": [ + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 83 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 85, + "mutability": "Not" + }, + { + "ty": 23, + "span": 82, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 86, + "scope": 1 + }, + "composite": null, + "value": { + "Const": { + "span": 81, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 85, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 87 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 13 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 72, + "mutability": "Not" + }, + { + "ty": 1, + "span": 72, + "mutability": "Not" + }, + { + "ty": 31, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_neg::precondition_check", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 58 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 59, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 8 + } + } + } + ] + } + ] + }, + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 1 + } + } + }, + "span": 57 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 9 + } + } + }, + "args": [], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 61 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 65 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 62, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 10 + } + } + }, + "args": [ + { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 64 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 65 + } + ], + "terminator": { + "kind": "Return", + "span": 66 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 67, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 68, + "mutability": "Not" + }, + { + "ty": 27, + "span": 64, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 68, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 69, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 70, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 71 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 12 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 72, + "mutability": "Not" + }, + { + "ty": 1, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 72, + "mutability": "Not" + }, + { + "ty": 1, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 10, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 88, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 89 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 90 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 91, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 92, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 92, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 93, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::intrinsics::cold_path", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 45 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 73 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 73, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 73 + } + } + }, + "details": null + } + ], + "types": [ + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json index 8dae9a816..304a8ec60 100644 --- a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json +++ b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json @@ -1 +1,2353 @@ -{"name":"unchecked_shl","crate_id":2438242285894030786,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,108,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[20,{"IntrinsicSym":"black_box"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E"}],[32,{"NormalSym":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE"}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h4b70c8118c54af25E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shl4main17h99915c6a84d89e82E","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shl","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShlUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file +{ + "name": "unchecked_shl", + "crate_id": 2438242285894030786, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 104, + 108, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 25, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h4b70c8118c54af25E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 16 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 85 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 86, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 87, + "mutability": "Not" + }, + { + "ty": 24, + "span": 88, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 87, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 88, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 90 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 11 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + }, + { + "ty": 31, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shl::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 16, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 7 + } + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 2 + }, + "span": 57 + } + ], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 8 + } + } + }, + "args": [ + { + "Constant": { + "span": 59, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 9 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 60 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 62, + "mutability": "Not" + }, + { + "ty": 21, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 60, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "rhs", + "source_info": { + "span": 62, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 63 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 65 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 67, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 12 + } + } + } + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": "Return", + "span": 66 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 69, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_shl4main17h99915c6a84d89e82E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + } + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 71, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 77 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 78, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 79, + "mutability": "Not" + }, + { + "ty": 23, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 80, + "scope": 1 + }, + "composite": null, + "value": { + "Const": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 79, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 82 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shl", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "ShlUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 24, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + } + ], + "types": [ + [ + 24, + { + "RigidTy": { + "Uint": "U32" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json index dba54586c..a18deb336 100644 --- a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json +++ b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json @@ -1 +1,2353 @@ -{"name":"unchecked_shr","crate_id":11374706484823853070,"allocs":[[1,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,104,114,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[36,{"NoOpSym":""}],[33,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E"}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E"}],[20,{"IntrinsicSym":"black_box"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E"}],[32,{"NormalSym":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E"}],[25,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":83,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":16}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":85}}],"locals":[{"ty":23,"span":86,"mutability":"Mut"},{"ty":23,"span":87,"mutability":"Not"},{"ty":24,"span":88,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":87,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":88,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_res","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":90}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":65}}],"locals":[{"ty":1,"span":65,"mutability":"Mut"},{"ty":29,"span":65,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":65}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":7,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17hd2b815e8bd96d253E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":64}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":11}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":64}},{"statements":[],"terminator":{"kind":"Resume","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":12,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"},{"ty":31,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":67,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":12}}}}]},"span":67}],"terminator":{"kind":"Return","span":66}}],"locals":[{"ty":17,"span":68,"mutability":"Mut"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":69,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":74},{"kind":{"Assign":[{"local":3,"projection":[]},{"Use":{"Constant":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}}}]},"span":76}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":71,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":13}}},"args":[{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}}],"destination":{"local":1,"projection":[]},"target":1,"unwind":"Continue"}},"span":72}},{"statements":[],"terminator":{"kind":"Return","span":77}}],"locals":[{"ty":1,"span":78,"mutability":"Mut"},{"ty":23,"span":79,"mutability":"Not"},{"ty":23,"span":74,"mutability":"Mut"},{"ty":24,"span":76,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":80,"scope":1},"composite":null,"value":{"Const":{"span":73,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}},"argument_index":null},{"name":"b","source_info":{"span":81,"scope":2},"composite":null,"value":{"Const":{"span":75,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[4,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":15}}},"argument_index":null},{"name":"result","source_info":{"span":79,"scope":3},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":82}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":64,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":10}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":64}},{"statements":[],"terminator":{"kind":"Return","span":64}}],"locals":[{"ty":16,"span":64,"mutability":"Mut"},{"ty":29,"span":64,"mutability":"Not"},{"ty":1,"span":64,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":64}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":54},{"kind":{"Assign":[{"local":2,"projection":[]},{"BinaryOp":["Lt",{"Copy":{"local":1,"projection":[]}},{"Constant":{"span":55,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[16,0,0,0],"provenance":{"ptrs":[]},"align":4,"mutability":"Mut"}},"ty":24,"id":7}}}]}]},"span":54}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":2,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[{"kind":{"StorageDead":2},"span":57}],"terminator":{"kind":"Return","span":56}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":58,"user_ty":null,"const_":{"kind":"ZeroSized","ty":25,"id":8}}},"args":[{"Constant":{"span":59,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":26,"id":9}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":60}}],"locals":[{"ty":1,"span":61,"mutability":"Mut"},{"ty":24,"span":62,"mutability":"Not"},{"ty":21,"span":54,"mutability":"Mut"},{"ty":27,"span":60,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"rhs","source_info":{"span":62,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":63}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_shr","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["ShrUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":24,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null}],"types":[[23,{"RigidTy":{"Int":"I16"}}],[2,{"RigidTy":{"Int":"I8"}}],[9,{"RigidTy":{"Uint":"U8"}}],[16,{"RigidTy":{"Int":"I32"}}],[24,{"RigidTy":{"Uint":"U32"}}],[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}]],"debug":null} \ No newline at end of file +{ + "name": "unchecked_shr", + "crate_id": 11374706484823853070, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 104, + 114, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E" + } + ], + [ + 25, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 16 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 85 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 86, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 87, + "mutability": "Not" + }, + { + "ty": 24, + "span": 88, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 87, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 88, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 90 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 65 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hd2b815e8bd96d253E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 11 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + }, + { + "ty": 31, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 67, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 12 + } + } + } + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": "Return", + "span": 66 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 69, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + } + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 71, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 77 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 78, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 79, + "mutability": "Not" + }, + { + "ty": 23, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 80, + "scope": 1 + }, + "composite": null, + "value": { + "Const": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 79, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 82 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shr::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 16, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 7 + } + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 2 + }, + "span": 57 + } + ], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 8 + } + } + }, + "args": [ + { + "Constant": { + "span": 59, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 9 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 60 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 62, + "mutability": "Not" + }, + { + "ty": 21, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 60, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "rhs", + "source_info": { + "span": 62, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 63 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shr", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "ShrUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 24, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + } + ], + "types": [ + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 24, + { + "RigidTy": { + "Uint": "U32" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json index ae8aeea5f..9559219eb 100644 --- a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json +++ b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json @@ -1 +1,2969 @@ -{"name":"unchecked_sub","crate_id":17961444647620661476,"allocs":[[2,{"Memory":{"bytes":[97,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,40,97,32,45,32,98,32,62,32,105,49,54,58,58,77,65,88,41,32,38,38,32,40,97,32,45,32,98,32,60,32,105,49,54,58,58,77,73,78,41],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}],[3,{"Memory":{"bytes":[117,110,115,97,102,101,32,112,114,101,99,111,110,100,105,116,105,111,110,40,115,41,32,118,105,111,108,97,116,101,100,58,32,105,49,54,58,58,117,110,99,104,101,99,107,101,100,95,115,117,98,32,99,97,110,110,111,116,32,111,118,101,114,102,108,111,119],"provenance":{"ptrs":[]},"align":1,"mutability":"Not"}}]],"functions":[[20,{"IntrinsicSym":"black_box"}],[13,{"NormalSym":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE"}],[14,{"NormalSym":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE"}],[24,{"NormalSym":"_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E"}],[36,{"NoOpSym":""}],[28,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE"}],[0,{"NormalSym":"_ZN3std2rt19lang_start_internal17h035df9ff6960926aE"}],[33,{"NormalSym":"_ZN4core9panicking5panic17h37379bf3ce79a0d7E"}],[34,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E"}],[32,{"NormalSym":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E"}],[19,{"NormalSym":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE"}],[30,{"NormalSym":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E"}],[22,{"NormalSym":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E"}]],"uneval_consts":[],"items":[{"symbol_name":"_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>::{closure#0}","id":1,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":2},"span":16},{"kind":{"StorageLive":3},"span":15},{"kind":{"StorageLive":4},"span":17},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":1,"projection":["Deref",{"Field":[0,7]}]}}}]},"span":17}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":14,"user_ty":null,"const_":{"kind":"ZeroSized","ty":13,"id":1}}},"args":[{"Move":{"local":4,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":15}},{"statements":[{"kind":{"StorageDead":4},"span":19}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":18,"user_ty":null,"const_":{"kind":"ZeroSized","ty":14,"id":2}}},"args":[{"Move":{"local":3,"projection":[]}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Continue"}},"span":16}},{"statements":[{"kind":{"StorageDead":3},"span":21},{"kind":{"StorageLive":5},"span":22},{"kind":{"Assign":[{"local":5,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":2,"projection":[{"Field":[0,15]}]}]}]},"span":22},{"kind":{"StorageLive":6},"span":23},{"kind":{"Assign":[{"local":6,"projection":[]},{"Use":{"Copy":{"local":2,"projection":[{"Field":[0,15]},{"Field":[0,9]}]}}}]},"span":23},{"kind":{"Assign":[{"local":0,"projection":[]},{"Cast":["IntToInt",{"Move":{"local":6,"projection":[]}},16]}]},"span":24},{"kind":{"StorageDead":6},"span":25},{"kind":{"StorageDead":5},"span":26},{"kind":{"StorageDead":2},"span":27}],"terminator":{"kind":"Return","span":20}}],"locals":[{"ty":16,"span":28,"mutability":"Mut"},{"ty":11,"span":3,"mutability":"Mut"},{"ty":17,"span":16,"mutability":"Mut"},{"ty":1,"span":15,"mutability":"Mut"},{"ty":7,"span":17,"mutability":"Mut"},{"ty":18,"span":22,"mutability":"Mut"},{"ty":9,"span":23,"mutability":"Mut"}],"arg_count":1,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":["Deref",{"Field":[0,7]}]}},"argument_index":null},{"name":"self","source_info":{"span":29,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":1},{"name":"self","source_info":{"span":30,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":1}],"spread_arg":null,"span":3}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub4main17h289393681834f0fcE","mono_item_kind":{"MonoItemFn":{"name":"main","id":8,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":1,"projection":[]},{"Use":{"Constant":{"span":78,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[42,0],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":13}}}}]},"span":78},{"kind":{"Assign":[{"local":2,"projection":[]},{"Use":{"Constant":{"span":79,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[213,255],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":14}}}}]},"span":79}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":76,"user_ty":null,"const_":{"kind":"ZeroSized","ty":32,"id":12}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":3,"projection":[]},"target":1,"unwind":"Continue"}},"span":77}},{"statements":[{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":80}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":6,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":2,"unwind":"Continue"}},"span":80}},{"statements":[{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Move":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":80},{"kind":{"Assign":[{"local":4,"projection":[]},{"BinaryOp":["Gt",{"Move":{"local":5,"projection":[]}},{"Constant":{"span":82,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[255,127],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":15}}}]}]},"span":81}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":4,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":3}}},"span":81}},{"statements":[{"kind":{"Assign":[{"local":9,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":83}],"terminator":{"kind":{"Assert":{"cond":{"Move":{"local":9,"projection":[{"Field":[1,21]}]}},"expected":false,"msg":{"Overflow":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]},"target":4,"unwind":"Continue"}},"span":83}},{"statements":[{"kind":{"Assign":[{"local":8,"projection":[]},{"Use":{"Move":{"local":9,"projection":[{"Field":[0,23]}]}}}]},"span":83},{"kind":{"Assign":[{"local":7,"projection":[]},{"BinaryOp":["Lt",{"Move":{"local":8,"projection":[]}},{"Constant":{"span":85,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,128],"provenance":{"ptrs":[]},"align":2,"mutability":"Mut"}},"ty":23,"id":16}}}]}]},"span":84}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":7,"projection":[]}},"targets":{"branches":[[0,6]],"otherwise":5}}},"span":84}},{"statements":[],"terminator":{"kind":"Return","span":86}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":87,"user_ty":null,"const_":{"kind":"ZeroSized","ty":33,"id":17}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,1]]},"align":8,"mutability":"Mut"}},"ty":25,"id":18}}}],"destination":{"local":10,"projection":[]},"target":null,"unwind":"Continue"}},"span":87}}],"locals":[{"ty":1,"span":88,"mutability":"Mut"},{"ty":23,"span":89,"mutability":"Not"},{"ty":23,"span":90,"mutability":"Not"},{"ty":23,"span":91,"mutability":"Not"},{"ty":21,"span":81,"mutability":"Mut"},{"ty":23,"span":80,"mutability":"Mut"},{"ty":27,"span":80,"mutability":"Mut"},{"ty":21,"span":84,"mutability":"Mut"},{"ty":23,"span":83,"mutability":"Mut"},{"ty":27,"span":83,"mutability":"Mut"},{"ty":26,"span":87,"mutability":"Mut"}],"arg_count":0,"var_debug_info":[{"name":"a","source_info":{"span":89,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":90,"scope":2},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":null},{"name":"result","source_info":{"span":91,"scope":3},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":92}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":28,"id":9}}},"args":[{"Move":{"local":1,"projection":["Deref"]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":29,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub::precondition_check","id":4,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":4},"span":55},{"kind":{"StorageLive":6},"span":56},{"kind":{"Assign":[{"local":6,"projection":[]},{"CheckedBinaryOp":["Sub",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":56},{"kind":{"Assign":[{"local":4,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[0,23]}]}}}]},"span":57},{"kind":{"Assign":[{"local":5,"projection":[]},{"Use":{"Copy":{"local":6,"projection":[{"Field":[1,21]}]}}}]},"span":58},{"kind":{"StorageDead":6},"span":59},{"kind":{"StorageDead":4},"span":55}],"terminator":{"kind":{"SwitchInt":{"discr":{"Copy":{"local":5,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":54}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":60,"user_ty":null,"const_":{"kind":"ZeroSized","ty":24,"id":7}}},"args":[{"Constant":{"span":61,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0],"provenance":{"ptrs":[[0,0]]},"align":8,"mutability":"Mut"}},"ty":25,"id":8}}}],"destination":{"local":3,"projection":[]},"target":null,"unwind":"Unreachable"}},"span":62}},{"statements":[],"terminator":{"kind":"Return","span":63}}],"locals":[{"ty":1,"span":64,"mutability":"Mut"},{"ty":23,"span":65,"mutability":"Not"},{"ty":23,"span":65,"mutability":"Not"},{"ty":26,"span":62,"mutability":"Not"},{"ty":23,"span":57,"mutability":"Not"},{"ty":21,"span":58,"mutability":"Not"},{"ty":27,"span":56,"mutability":"Mut"}],"arg_count":2,"var_debug_info":[{"name":"lhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":65,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"self","source_info":{"span":66,"scope":1},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":67,"scope":1},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"a","source_info":{"span":57,"scope":2},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":null},{"name":"b","source_info":{"span":58,"scope":2},"composite":null,"value":{"Place":{"local":5,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":68}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE","mono_item_kind":{"MonoItemFn":{"name":"<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once","id":5,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":3,"projection":[]},{"Ref":[{"kind":"ReErased"},{"Mut":{"kind":"Default"}},{"local":1,"projection":[]}]}]},"span":69}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":69,"user_ty":null,"const_":{"kind":"ZeroSized","ty":30,"id":10}}},"args":[{"Move":{"local":3,"projection":[]}},{"Move":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":{"Cleanup":3}}},"span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":2,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}},{"statements":[],"terminator":{"kind":{"Drop":{"place":{"local":1,"projection":[]},"target":4,"unwind":"Terminate"}},"span":69}},{"statements":[],"terminator":{"kind":"Resume","span":69}}],"locals":[{"ty":16,"span":69,"mutability":"Mut"},{"ty":12,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"},{"ty":31,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE","mono_item_kind":{"MonoItemFn":{"name":"<() as std::process::Termination>::report","id":7,"body":[{"blocks":[{"statements":[{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Constant":{"span":72,"user_ty":null,"const_":{"kind":{"Allocated":{"bytes":[0],"provenance":{"ptrs":[]},"align":1,"mutability":"Mut"}},"ty":17,"id":11}}}}]},"span":72}],"terminator":{"kind":"Return","span":71}}],"locals":[{"ty":17,"span":73,"mutability":"Mut"},{"ty":1,"span":74,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"self","source_info":{"span":74,"scope":0},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":75}]}},"details":null},{"symbol_name":"_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E","mono_item_kind":{"MonoItemFn":{"name":"std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>","id":6,"body":[{"blocks":[{"statements":[],"terminator":{"kind":"Return","span":70}}],"locals":[{"ty":1,"span":70,"mutability":"Mut"},{"ty":29,"span":70,"mutability":"Not"}],"arg_count":1,"var_debug_info":[],"spread_arg":null,"span":70}]}},"details":null},{"symbol_name":"_ZN3std2rt10lang_start17h233dfbd9029fc4f7E","mono_item_kind":{"MonoItemFn":{"name":"std::rt::lang_start::<()>","id":0,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":5},"span":1},{"kind":{"StorageLive":6},"span":2},{"kind":{"StorageLive":8},"span":3},{"kind":{"Assign":[{"local":8,"projection":[]},{"Aggregate":[{"Closure":[1,[{"Type":1},{"Type":2},{"Type":3},{"Type":4}]]},[{"Copy":{"local":1,"projection":[]}}]]}]},"span":3},{"kind":{"Assign":[{"local":7,"projection":[]},{"Ref":[{"kind":"ReErased"},"Shared",{"local":8,"projection":[]}]}]},"span":2},{"kind":{"Assign":[{"local":6,"projection":[]},{"Cast":[{"PointerCoercion":"Unsize"},{"Copy":{"local":7,"projection":[]}},5]}]},"span":2}],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":0,"user_ty":null,"const_":{"kind":"ZeroSized","ty":0,"id":0}}},"args":[{"Move":{"local":6,"projection":[]}},{"Move":{"local":2,"projection":[]}},{"Move":{"local":3,"projection":[]}},{"Move":{"local":4,"projection":[]}}],"destination":{"local":5,"projection":[]},"target":1,"unwind":"Continue"}},"span":1}},{"statements":[{"kind":{"StorageDead":6},"span":5},{"kind":{"Assign":[{"local":0,"projection":[]},{"Use":{"Copy":{"local":5,"projection":[{"Downcast":0},{"Field":[0,6]}]}}}]},"span":6},{"kind":{"StorageDead":8},"span":7},{"kind":{"StorageDead":5},"span":7}],"terminator":{"kind":"Return","span":4}}],"locals":[{"ty":6,"span":8,"mutability":"Mut"},{"ty":7,"span":9,"mutability":"Not"},{"ty":6,"span":10,"mutability":"Not"},{"ty":8,"span":11,"mutability":"Not"},{"ty":9,"span":12,"mutability":"Not"},{"ty":10,"span":1,"mutability":"Mut"},{"ty":5,"span":2,"mutability":"Mut"},{"ty":11,"span":2,"mutability":"Not"},{"ty":12,"span":3,"mutability":"Not"}],"arg_count":4,"var_debug_info":[{"name":"main","source_info":{"span":9,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"argc","source_info":{"span":10,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"argv","source_info":{"span":11,"scope":0},"composite":null,"value":{"Place":{"local":3,"projection":[]}},"argument_index":3},{"name":"sigpipe","source_info":{"span":12,"scope":0},"composite":null,"value":{"Place":{"local":4,"projection":[]}},"argument_index":4},{"name":"v","source_info":{"span":6,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":13}]}},"details":null},{"symbol_name":"_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E","mono_item_kind":{"MonoItemFn":{"name":"core::num::::unchecked_sub","id":3,"body":[{"blocks":[{"statements":[{"kind":{"StorageLive":3},"span":43},{"kind":{"Assign":[{"local":3,"projection":[]},{"NullaryOp":["UbChecks",21]}]},"span":44}],"terminator":{"kind":{"SwitchInt":{"discr":{"Move":{"local":3,"projection":[]}},"targets":{"branches":[[0,2]],"otherwise":1}}},"span":43}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":45,"user_ty":null,"const_":{"kind":"ZeroSized","ty":22,"id":6}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":4,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":46}},{"statements":[{"kind":{"StorageDead":3},"span":48},{"kind":{"Assign":[{"local":0,"projection":[]},{"BinaryOp":["SubUnchecked",{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}]}]},"span":49}],"terminator":{"kind":"Return","span":47}}],"locals":[{"ty":23,"span":50,"mutability":"Mut"},{"ty":23,"span":51,"mutability":"Not"},{"ty":23,"span":52,"mutability":"Not"},{"ty":21,"span":43,"mutability":"Mut"},{"ty":1,"span":46,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"self","source_info":{"span":51,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"rhs","source_info":{"span":52,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2}],"spread_arg":null,"span":53}]}},"details":null},{"symbol_name":"_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE","mono_item_kind":{"MonoItemFn":{"name":"std::sys::backtrace::__rust_begin_short_backtrace::","id":2,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":31,"user_ty":null,"const_":{"kind":"ZeroSized","ty":19,"id":3}}},"args":[{"Move":{"local":1,"projection":[]}},{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":33}},{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":34,"user_ty":null,"const_":{"kind":"ZeroSized","ty":20,"id":5}}},"args":[{"Constant":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}}],"destination":{"local":2,"projection":[]},"target":2,"unwind":"Unreachable"}},"span":35}},{"statements":[],"terminator":{"kind":"Return","span":36}}],"locals":[{"ty":1,"span":37,"mutability":"Mut"},{"ty":7,"span":38,"mutability":"Not"},{"ty":1,"span":39,"mutability":"Not"}],"arg_count":1,"var_debug_info":[{"name":"f","source_info":{"span":38,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"result","source_info":{"span":40,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null},{"name":"dummy","source_info":{"span":41,"scope":2},"composite":null,"value":{"Const":{"span":32,"user_ty":null,"const_":{"kind":"ZeroSized","ty":1,"id":4}}},"argument_index":1}],"spread_arg":null,"span":42}]}},"details":null},{"symbol_name":"_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE","mono_item_kind":{"MonoItemFn":{"name":">::call_once","id":5,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Move":{"local":1,"projection":[]}},"args":[],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":69}},{"statements":[],"terminator":{"kind":"Return","span":69}}],"locals":[{"ty":1,"span":69,"mutability":"Mut"},{"ty":7,"span":69,"mutability":"Not"},{"ty":1,"span":69,"mutability":"Not"}],"arg_count":2,"var_debug_info":[],"spread_arg":2,"span":69}]}},"details":null},{"symbol_name":"_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E","mono_item_kind":{"MonoItemFn":{"name":"unchecked_op","id":9,"body":[{"blocks":[{"statements":[],"terminator":{"kind":{"Call":{"func":{"Constant":{"span":93,"user_ty":null,"const_":{"kind":"ZeroSized","ty":34,"id":19}}},"args":[{"Copy":{"local":1,"projection":[]}},{"Copy":{"local":2,"projection":[]}}],"destination":{"local":0,"projection":[]},"target":1,"unwind":"Continue"}},"span":94}},{"statements":[],"terminator":{"kind":"Return","span":95}}],"locals":[{"ty":23,"span":96,"mutability":"Mut"},{"ty":23,"span":97,"mutability":"Not"},{"ty":23,"span":98,"mutability":"Not"}],"arg_count":2,"var_debug_info":[{"name":"a","source_info":{"span":97,"scope":0},"composite":null,"value":{"Place":{"local":1,"projection":[]}},"argument_index":1},{"name":"b","source_info":{"span":98,"scope":0},"composite":null,"value":{"Place":{"local":2,"projection":[]}},"argument_index":2},{"name":"unchecked_sum","source_info":{"span":99,"scope":1},"composite":null,"value":{"Place":{"local":0,"projection":[]}},"argument_index":null}],"spread_arg":null,"span":100}]}},"details":null}],"types":[[21,{"RigidTy":"Bool"}],[6,{"RigidTy":{"Int":"Isize"}}],[2,{"RigidTy":{"Int":"I8"}}],[16,{"RigidTy":{"Int":"I32"}}],[23,{"RigidTy":{"Int":"I16"}}],[9,{"RigidTy":{"Uint":"U8"}}]],"debug":null} \ No newline at end of file +{ + "name": "unchecked_sub", + "crate_id": 17961444647620661476, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 40, + 97, + 32, + 45, + 32, + 98, + 32, + 62, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 65, + 88, + 41, + 32, + 38, + 38, + 32, + 40, + 97, + 32, + 45, + 32, + 98, + 32, + 60, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 73, + 78, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 117, + 98, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE" + } + ], + [ + 24, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_sub4main17h289393681834f0fcE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 13 + } + } + } + } + ] + }, + "span": 78 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 213, + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 76, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 12 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 80 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Constant": { + "span": 82, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255, + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 15 + } + } + } + ] + } + ] + }, + "span": 81 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 3 + } + } + }, + "span": 81 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 83 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 83 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + ] + } + ] + }, + "span": 84 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 5 + } + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 86 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 87, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 58, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 18 + } + } + } + ], + "destination": { + "local": 10, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 87 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 89, + "mutability": "Not" + }, + { + "ty": 23, + "span": 90, + "mutability": "Not" + }, + { + "ty": 23, + "span": 91, + "mutability": "Not" + }, + { + "ty": 21, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 87, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 90, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 91, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 92 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 8 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 62, + "mutability": "Not" + }, + { + "ty": 23, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + }, + { + "ty": 31, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 11 + } + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": "Return", + "span": 71 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 74, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 74, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 75 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 70 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h233dfbd9029fc4f7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 23, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 93, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 96, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 97, + "mutability": "Not" + }, + { + "ty": 23, + "span": 98, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 97, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 98, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_sum", + "source_info": { + "span": 99, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + } + ], + "types": [ + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} From 3ed00bd1bf0a5a629d83666cf269734e8f092068 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Fri, 28 Mar 2025 16:27:43 -0600 Subject: [PATCH 23/84] Adding First round of attempt to package kmir to python whl with some bugs and challenge to fully isolate built dependencies into the src contained for packaging and installation deployiment. Current problem: - Post installation of whl .cache/kdist- file is not available and hardcoded to look in ~/.cache/kdist- - This needs a generalized location or be installed to site-package swith the rest of the library files for python packaging to work as intended. - Unresolved understanding of where stable-mir-json artifacts need to be stored / referenced for kmir prove - Published a single docker image from manual built image to produce an alias poetry-kmir usable image within CI, but is not ideal for scripting / simple usage and inspection by developer. --- .github/workflows/container-test.yml | 23 ++++++ .github/workflows/release.yml | 35 +++++++++ .gitignore | 2 + Dockerfile | 34 +++++++++ Makefile | 11 ++- kmir/poetry.lock | 108 ++++----------------------- kmir/pyproject.toml | 40 ++++++++-- kmir/src/kmir/__init__.py | 2 + kmir/src/kmir/kdist/__init__.py | 1 + kmir/src/kmir/kdist/plugin.py | 13 ++-- 10 files changed, 162 insertions(+), 107 deletions(-) create mode 100644 .github/workflows/container-test.yml create mode 100644 .github/workflows/release.yml create mode 100644 Dockerfile diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml new file mode 100644 index 000000000..2aa88673f --- /dev/null +++ b/.github/workflows/container-test.yml @@ -0,0 +1,23 @@ +name: Test Built Container + +on: + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + container: + image: ghcr.io/runtimeverification/mir-semantics/kmir:ubuntu-jammy-7.1.229 + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + ref: sample-challenge-11-proofs + + - name: Kmir Prove + run: | + cd rust-verification-proofs/unchecked_add + kmir prove run $PWD/unchecked-op-spec.k --proof-dir $PWD/proof diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..a509cfc93 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: "Release KMIR" + +on: + push: + branches: + - master + +jobs: + release: + runs-on: [self-hosted, linux, normal] + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: 'Setup Docker Buildx' + uses: docker/setup-buildx-action@v3.10.0 + + - name: 'Login to Docker Hub' + uses: docker/login-action@v3.4.0 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set K_VERSION + id: k_version + run: | + echo "K_VERSION=${{ github.sha }}" >> $GITHUB_OUTPUT + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: false + tags: ghcr.io/runtimeverification/mir-semantics/kmir:ubuntu-jammy-${{ steps.k_version.outputs.K_VERSION }} + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 98fe5a7f3..fe8dcc4dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /dist/ __pycache__/ .coverage +kmir/dist +kmir/src/kmir/kdist/kdist-* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..a3b7178cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +ARG K_VERSION +FROM runtimeverificationinc/kframework-k:ubuntu-jammy-$K_VERSION AS builder + +RUN apt-get update && apt-get install -y \ + curl \ + git \ + gcc \ + g++ \ + make \ + python3 \ + python3-pip \ + python3-venv + +RUN pip3 install poetry + +RUN curl https://sh.rustup.rs -sSfy | sh + +COPY . /app +WORKDIR /app + +RUN make && make dist +RUN cd deps/stable-mir-json && git submodule update --init --recursive && :q + +RUN echo "alias poetry-kmir='poetry -C /app/kmir/ run --'" >> /root/.bashrc + +FROM ubuntu:22.04 + +RUN apt-get update && apt-get install -y \ + python3 \ + python3-pip + +COPY --from=builder /app/kmir/dist/*.whl /app/kmir/dist/ + +RUN pip3 install /app/kmir/dist/*.whl diff --git a/Makefile b/Makefile index 12374d9d6..633b9c896 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,9 @@ smir-parse-tests: # build # commented out for CI's sake poetry-install: $(POETRY) install +lock: + $(POETRY) lock + test-unit: poetry-install # build # commented out for CI's sake $(POETRY_RUN) pytest $(TOP_DIR)/kmir/src/tests/unit --maxfail=1 --verbose $(TEST_ARGS) @@ -52,6 +55,12 @@ test-integration: build $(POETRY_RUN) pytest $(TOP_DIR)/kmir/src/tests/integration --maxfail=1 --verbose \ --durations=0 --numprocesses=4 --dist=worksteal $(TEST_ARGS) +install: poetry-install + $(POETRY_RUN) pip install --user . + +dist: poetry-install + cd kmir && poetry build + # Checks and formatting format: autoflake isort black @@ -103,7 +112,7 @@ cov-integration: test-integration .PHONY: clean clean: - rm -rf kmir/dist kmir/.coverage kmir/cov-* kmir/.mypy_cache kmir/.pytest_cache + rm -rf kmir/dist kmir/.coverage kmir/cov-* kmir/.mypy_cache kmir/.pytest_cache kmir/src/kmir/kdist/kdist-* find kmir/ -type d -name __pycache__ -prune -exec rm -rf {} \; pyupgrade: SRC_FILES := $(shell find kmir/src -type f -name '*.py') diff --git a/kmir/poetry.lock b/kmir/poetry.lock index a1cb13dbd..c7faa7e64 100644 --- a/kmir/poetry.lock +++ b/kmir/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "arrow" version = "1.3.0" description = "Better dates & times for Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -18,13 +17,12 @@ types-python-dateutil = ">=2.8.10" [package.extras] doc = ["doc8", "sphinx (>=7.0.0)", "sphinx-autobuild", "sphinx-autodoc-typehints", "sphinx_rtd_theme (>=1.3.0)"] -test = ["dateparser (>=1.0.0,<2.0.0)", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytz (==2021.1)", "simplejson (>=3.0.0,<4.0.0)"] +test = ["dateparser (==1.*)", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytz (==2021.1)", "simplejson (==3.*)"] [[package]] name = "attrs" version = "25.3.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -44,7 +42,6 @@ tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] name = "autoflake" version = "2.3.1" description = "Removes unused imports and unused variables" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -60,7 +57,6 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} name = "binaryornot" version = "0.4.4" description = "Ultra-lightweight pure Python package to check if a file is binary or text." -category = "main" optional = false python-versions = "*" files = [ @@ -75,7 +71,6 @@ chardet = ">=3.0.2" name = "black" version = "25.1.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -122,7 +117,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2025.1.31" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -134,7 +128,6 @@ files = [ name = "chardet" version = "5.2.0" description = "Universal encoding detector for Python 3" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -146,7 +139,6 @@ files = [ name = "charset-normalizer" version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -248,7 +240,6 @@ files = [ name = "classify-imports" version = "4.2.0" description = "Utilities for refactoring imports in python-like syntax." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -260,7 +251,6 @@ files = [ name = "click" version = "8.1.8" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -275,7 +265,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "cmd2" version = "2.5.11" description = "cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -293,7 +282,6 @@ wcwidth = ">=0.2.10" name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -305,7 +293,6 @@ files = [ name = "coloredlogs" version = "15.0.1" description = "Colored terminal output for Python's logging module" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -323,7 +310,6 @@ cron = ["capturer (>=2.4)"] name = "cookiecutter" version = "2.6.0" description = "A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -345,7 +331,6 @@ rich = "*" name = "coverage" version = "7.7.1" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -424,7 +409,6 @@ toml = ["tomli"] name = "exceptiongroup" version = "1.2.2" description = "Backport of PEP 654 (exception groups)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -439,7 +423,6 @@ test = ["pytest (>=6)"] name = "execnet" version = "2.1.1" description = "execnet: rapid multi-Python deployment" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -454,7 +437,6 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] name = "filelock" version = "3.18.0" description = "A platform independent file lock." -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -471,7 +453,6 @@ typing = ["typing-extensions (>=4.12.2)"] name = "flake8" version = "7.1.2" description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" optional = false python-versions = ">=3.8.1" files = [ @@ -488,7 +469,6 @@ pyflakes = ">=3.2.0,<3.3.0" name = "flake8-bugbear" version = "24.12.12" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." -category = "dev" optional = false python-versions = ">=3.8.1" files = [ @@ -507,7 +487,6 @@ dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "pytest", name = "flake8-comprehensions" version = "3.16.0" description = "A flake8 plugin to help you write better list/set/dict comprehensions." -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -522,7 +501,6 @@ flake8 = ">=3,<3.2 || >3.2" name = "flake8-quotes" version = "3.4.0" description = "Flake8 lint for quotes." -category = "dev" optional = false python-versions = "*" files = [ @@ -537,7 +515,6 @@ setuptools = "*" name = "flake8-type-checking" version = "3.0.0" description = "A flake8 plugin for managing type-checking imports & forward references" -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -553,7 +530,6 @@ flake8 = "*" name = "gnureadline" version = "8.2.13" description = "The standard Python readline extension statically linked against the GNU readline library." -category = "main" optional = false python-versions = "*" files = [ @@ -593,7 +569,6 @@ files = [ name = "graphviz" version = "0.20.3" description = "Simple Python interface for Graphviz" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -610,7 +585,6 @@ test = ["coverage", "pytest (>=7,<8.1)", "pytest-cov", "pytest-mock (>=3)"] name = "humanfriendly" version = "10.0" description = "Human friendly output for text interfaces using Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -623,14 +597,13 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve [[package]] name = "hypothesis" -version = "6.130.2" +version = "6.130.5" description = "A library for property-based testing" -category = "main" optional = false python-versions = ">=3.9" files = [ - {file = "hypothesis-6.130.2-py3-none-any.whl", hash = "sha256:b4c03a4a34466e76ecba518390e1759294607d44744e7e122477371b12deb03f"}, - {file = "hypothesis-6.130.2.tar.gz", hash = "sha256:979195ef58c309aab98d74b64bbcda5411d0bc86848c1bf89dbffb78c7c7e3ee"}, + {file = "hypothesis-6.130.5-py3-none-any.whl", hash = "sha256:c13e42ec7df7fdc45c44d0b39f1e429d2253e19a37041d927e092afa7645bfcf"}, + {file = "hypothesis-6.130.5.tar.gz", hash = "sha256:2cdcdd894adc390a688c8a1c08580c345a67ecf73e31d5bb51a7712acf7b747c"}, ] [package.dependencies] @@ -639,10 +612,10 @@ exceptiongroup = {version = ">=1.0.0", markers = "python_version < \"3.11\""} sortedcontainers = ">=2.1.0,<3.0.0" [package.extras] -all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.83)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.20)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2025.1)", "watchdog (>=4.0.0)"] +all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.84)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.20)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2025.1)", "watchdog (>=4.0.0)"] cli = ["black (>=19.10b0)", "click (>=7.0)", "rich (>=9.0.0)"] codemods = ["libcst (>=0.3.16)"] -crosshair = ["crosshair-tool (>=0.0.83)", "hypothesis-crosshair (>=0.0.20)"] +crosshair = ["crosshair-tool (>=0.0.84)", "hypothesis-crosshair (>=0.0.20)"] dateutil = ["python-dateutil (>=1.4)"] django = ["django (>=4.2)"] dpcontracts = ["dpcontracts (>=0.4)"] @@ -660,7 +633,6 @@ zoneinfo = ["tzdata (>=2025.1)"] name = "idna" version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -675,7 +647,6 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 name = "importlib-metadata" version = "8.6.1" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -699,7 +670,6 @@ type = ["pytest-mypy"] name = "iniconfig" version = "2.1.0" description = "brain-dead simple config-ini parsing" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -711,7 +681,6 @@ files = [ name = "isort" version = "6.0.1" description = "A Python utility / library to sort Python imports." -category = "dev" optional = false python-versions = ">=3.9.0" files = [ @@ -727,7 +696,6 @@ plugins = ["setuptools"] name = "jinja2" version = "3.1.6" description = "A very fast and expressive template engine." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -745,7 +713,6 @@ i18n = ["Babel (>=2.7)"] name = "kframework" version = "7.1.229" description = "" -category = "main" optional = false python-versions = "<4.0,>=3.10" files = [ @@ -772,7 +739,6 @@ xdg-base-dirs = ">=6.0.1,<7.0.0" name = "linkify-it-py" version = "2.0.3" description = "Links recognition library with FULL unicode support." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -793,7 +759,6 @@ test = ["coverage", "pytest", "pytest-cov"] name = "markdown-it-py" version = "2.2.0" description = "Python port of markdown-it. Markdown parsing, done right!" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -820,7 +785,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -891,7 +855,6 @@ files = [ name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -903,7 +866,6 @@ files = [ name = "mdit-py-plugins" version = "0.4.2" description = "Collection of plugins for markdown-it-py" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -923,7 +885,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -935,7 +896,6 @@ files = [ name = "mypy" version = "1.15.0" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -989,7 +949,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1001,7 +960,6 @@ files = [ name = "networkx" version = "3.4.2" description = "Python package for creating and manipulating graphs and networks" -category = "main" optional = false python-versions = ">=3.10" files = [ @@ -1021,7 +979,6 @@ test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] name = "packaging" version = "24.2" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1033,7 +990,6 @@ files = [ name = "pathspec" version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1045,7 +1001,6 @@ files = [ name = "pep8-naming" version = "0.14.1" description = "Check PEP-8 naming conventions, plugin for flake8" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1060,7 +1015,6 @@ flake8 = ">=5.0.0" name = "platformdirs" version = "4.3.7" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1077,7 +1031,6 @@ type = ["mypy (>=1.14.1)"] name = "pluggy" version = "1.5.0" description = "plugin and hook calling mechanisms for python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1093,7 +1046,6 @@ testing = ["pytest", "pytest-benchmark"] name = "psutil" version = "5.9.8" description = "Cross-platform lib for process and system monitoring in Python." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -1122,7 +1074,6 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] name = "pybind11" version = "2.13.6" description = "Seamless operability between C++11 and Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1137,7 +1088,6 @@ global = ["pybind11-global (==2.13.6)"] name = "pycodestyle" version = "2.12.1" description = "Python style guide checker" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1149,7 +1099,6 @@ files = [ name = "pyflakes" version = "3.2.0" description = "passive checker of Python programs" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1161,7 +1110,6 @@ files = [ name = "pygments" version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1176,7 +1124,6 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pyperclip" version = "1.9.0" description = "A cross-platform clipboard module for Python. (Only handles plain text for now.)" -category = "main" optional = false python-versions = "*" files = [ @@ -1187,7 +1134,6 @@ files = [ name = "pyreadline3" version = "3.5.4" description = "A python implementation of GNU readline." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1202,7 +1148,6 @@ dev = ["build", "flake8", "mypy", "pytest", "twine"] name = "pytest" version = "8.3.5" description = "pytest: simple powerful testing with Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1225,7 +1170,6 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments name = "pytest-cov" version = "6.0.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1244,7 +1188,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] name = "pytest-mock" version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1262,7 +1205,6 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] name = "pytest-xdist" version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1283,7 +1225,6 @@ testing = ["filelock"] name = "python-dateutil" version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1298,7 +1239,6 @@ six = ">=1.5" name = "python-slugify" version = "8.0.4" description = "A Python slugify application that also handles Unicode" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1316,7 +1256,6 @@ unidecode = ["Unidecode (>=1.1.1)"] name = "pyupgrade" version = "3.19.1" description = "A tool to automatically upgrade syntax for newer versions." -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1331,7 +1270,6 @@ tokenize-rt = ">=6.1.0" name = "pyyaml" version = "6.0.2" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1394,7 +1332,6 @@ files = [ name = "requests" version = "2.32.3" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1416,7 +1353,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rich" version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" -category = "main" optional = false python-versions = ">=3.8.0" files = [ @@ -1434,14 +1370,13 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "setuptools" -version = "77.0.3" +version = "78.1.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" optional = false python-versions = ">=3.9" files = [ - {file = "setuptools-77.0.3-py3-none-any.whl", hash = "sha256:67122e78221da5cf550ddd04cf8742c8fe12094483749a792d56cd669d6cf58c"}, - {file = "setuptools-77.0.3.tar.gz", hash = "sha256:583b361c8da8de57403743e756609670de6fb2345920e36dc5c2d914c319c945"}, + {file = "setuptools-78.1.0-py3-none-any.whl", hash = "sha256:3e386e96793c8702ae83d17b853fb93d3e09ef82ec62722e61da5cd22376dcd8"}, + {file = "setuptools-78.1.0.tar.gz", hash = "sha256:18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54"}, ] [package.extras] @@ -1451,13 +1386,12 @@ cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (>=1.14.0,<1.15.0)", "pytest-mypy"] +type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.14.*)", "pytest-mypy"] [[package]] name = "six" version = "1.17.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1469,7 +1403,6 @@ files = [ name = "sortedcontainers" version = "2.4.0" description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" -category = "main" optional = false python-versions = "*" files = [ @@ -1481,7 +1414,6 @@ files = [ name = "text-unidecode" version = "1.3" description = "The most basic Text::Unidecode port" -category = "main" optional = false python-versions = "*" files = [ @@ -1493,7 +1425,6 @@ files = [ name = "textual" version = "0.27.0" description = "Modern Text User Interface framework" -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -1514,7 +1445,6 @@ dev = ["aiohttp (>=3.8.1)", "click (>=8.1.2)", "msgpack (>=1.0.3)"] name = "tokenize-rt" version = "6.1.0" description = "A wrapper around the stdlib `tokenize` which roundtrips." -category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1526,7 +1456,6 @@ files = [ name = "tomli" version = "2.2.1" description = "A lil' TOML parser" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1568,7 +1497,6 @@ files = [ name = "types-python-dateutil" version = "2.9.0.20241206" description = "Typing stubs for python-dateutil" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1578,21 +1506,19 @@ files = [ [[package]] name = "typing-extensions" -version = "4.12.2" +version = "4.13.0" description = "Backported and Experimental Type Hints for Python 3.8+" -category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, - {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, + {file = "typing_extensions-4.13.0-py3-none-any.whl", hash = "sha256:c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5"}, + {file = "typing_extensions-4.13.0.tar.gz", hash = "sha256:0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b"}, ] [[package]] name = "uc-micro-py" version = "1.0.3" description = "Micro subset of unicode data files for linkify-it-py projects." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1607,7 +1533,6 @@ test = ["coverage", "pytest", "pytest-cov"] name = "urllib3" version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1625,7 +1550,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "wcwidth" version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" -category = "main" optional = false python-versions = "*" files = [ @@ -1637,7 +1561,6 @@ files = [ name = "xdg-base-dirs" version = "6.0.2" description = "Variables defined by the XDG Base Directory Specification" -category = "main" optional = false python-versions = "<4.0,>=3.10" files = [ @@ -1649,7 +1572,6 @@ files = [ name = "zipp" version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1668,4 +1590,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "f58750f63768196f9e102e42e3fc879d798855b5ef3df924f24bd56250e2ddc7" +content-hash = "5e1cf997ea2d184fa59d530d6f0e1299a0cb99cb3f7c0d0a21ae04d16bd7ad12" diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 0e3efbeff..637b38d5f 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -9,21 +9,26 @@ description = "" authors = [ "Runtime Verification, Inc. ", ] +packages = [ + { include = "kmir", from = "src" } +] -[tool.poetry.scripts] -parse = "kmir.parse.__main__:main" -kmir = "kmir.__main__:main" - -[tool.poetry.plugins.kdist] -mir-semantics = "kmir.kdist.plugin" +[tool.poetry.package-data] +"kmir.kdist" = ["kdist-* -[tool.poetry.plugins.pytest11] -pytest-kmir = "kmir.testing.fixtures" +include = [ + "dist/semantics/mir-semantics/**/*" +] +# Core runtime dependencies [tool.poetry.dependencies] python = "^3.10" kframework = "7.1.229" +# Development dependencies (not installed in production) +[tool.poetry.group.dev] +optional = true + [tool.poetry.group.dev.dependencies] autoflake = "*" black = "*" @@ -41,6 +46,25 @@ pytest-mock = "*" pytest-xdist = "*" pyupgrade = "*" +[tool.poetry.group.test] +optional = true + +[tool.poetry.group.test.dependencies] +pytest = "*" +pytest-cov = "*" +pytest-mock = "*" +pytest-xdist = "*" + +[tool.poetry.scripts] +parse = "kmir.parse.__main__:main" +kmir = "kmir.__main__:main" + +[tool.poetry.plugins.kdist] +mir-semantics = "kmir.kdist.plugin" + +[tool.poetry.plugins.pytest11] +pytest-kmir = "kmir.testing.fixtures" + [tool.isort] profile = "black" line_length = 120 diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index 0e5933cd0..bcfb73cac 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,5 @@ from typing import Final VERSION: Final = '0.3.109' + +from . import kdist \ No newline at end of file diff --git a/kmir/src/kmir/kdist/__init__.py b/kmir/src/kmir/kdist/__init__.py index e69de29bb..8b1378917 100644 --- a/kmir/src/kmir/kdist/__init__.py +++ b/kmir/src/kmir/kdist/__init__.py @@ -0,0 +1 @@ + diff --git a/kmir/src/kmir/kdist/plugin.py b/kmir/src/kmir/kdist/plugin.py index c2d2f6f43..67efc4eec 100644 --- a/kmir/src/kmir/kdist/plugin.py +++ b/kmir/src/kmir/kdist/plugin.py @@ -11,11 +11,11 @@ from collections.abc import Callable, Mapping from typing import Any, Final - class SourceTarget(Target): SRC_DIR: Final = Path(__file__).parent def build(self, output_dir: Path, deps: dict[str, Path], args: dict[str, Any], verbose: bool) -> None: + # Just copy to output_dir shutil.copytree(self.SRC_DIR / 'mir-semantics', output_dir / 'mir-semantics') def source(self) -> tuple[Path, ...]: @@ -24,7 +24,6 @@ def source(self) -> tuple[Path, ...]: def deps(self) -> tuple[()]: return () - class KompileTarget(Target): _kompile_args: Callable[[Path], Mapping[str, Any]] @@ -33,12 +32,16 @@ def __init__(self, kompile_args: Callable[[Path], Mapping[str, Any]]): def build(self, output_dir: Path, deps: dict[str, Path], args: dict[str, Any], verbose: bool) -> None: kompile_args = self._kompile_args(deps['mir-semantics.source']) - kompile(output_dir=output_dir, verbose=verbose, **kompile_args) + # Use the installed directory for output + kompile(output_dir=self.KDIST_DIR, verbose=verbose, **kompile_args) + # Copy to output_dir if needed for immediate use + if output_dir.exists(): + shutil.rmtree(output_dir) + shutil.copytree(self.KDIST_DIR, output_dir) def deps(self) -> tuple[str, ...]: return ('mir-semantics.source',) - def _default_args(src_dir: Path) -> dict[str, Any]: return { 'include_dirs': [src_dir], @@ -47,7 +50,6 @@ def _default_args(src_dir: Path) -> dict[str, Any]: 'syntax_module': 'KMIR-SYNTAX', } - __TARGETS__: Final = { 'source': SourceTarget(), 'llvm': KompileTarget( @@ -73,3 +75,4 @@ def _default_args(src_dir: Path) -> dict[str, Any]: }, ), } + From 80e792f9d26a88732752f20655dde66d49f6af3f Mon Sep 17 00:00:00 2001 From: devops Date: Fri, 28 Mar 2025 22:31:02 +0000 Subject: [PATCH 24/84] Set Version: 0.3.110 --- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- package/version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 637b38d5f..f41b96a66 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.109" +version = "0.3.110" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index bcfb73cac..3d0179538 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,5 +1,5 @@ from typing import Final -VERSION: Final = '0.3.109' +VERSION: Final = '0.3.110' from . import kdist \ No newline at end of file diff --git a/package/version b/package/version index 7b32a6e29..14e8e2472 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.109 +0.3.110 From e772ece201fa46a83ce83eb849e2d0333eafcc75 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Fri, 28 Mar 2025 16:38:48 -0600 Subject: [PATCH 25/84] Remove unfinished thought --- kmir/pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index f41b96a66..114a83c13 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -13,9 +13,6 @@ packages = [ { include = "kmir", from = "src" } ] -[tool.poetry.package-data] -"kmir.kdist" = ["kdist-* - include = [ "dist/semantics/mir-semantics/**/*" ] From 1e5f302424835032dbf263c06fa780089e534a35 Mon Sep 17 00:00:00 2001 From: devops Date: Sat, 29 Mar 2025 18:48:28 +0000 Subject: [PATCH 26/84] Set Version: 0.3.111 --- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- package/version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 114a83c13..7fd251890 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.110" +version = "0.3.111" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index c0a87a92d..91f6ba837 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.110' +VERSION: Final = '0.3.111' diff --git a/package/version b/package/version index 14e8e2472..766a4566d 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.110 +0.3.111 From ab4a85318cf517169b9fab7df31b9a456c60bc8a Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 13:44:08 -0600 Subject: [PATCH 27/84] Revert to master --- kmir/poetry.lock | 108 ++++++++++++++++++++++++++++++++++++++------ kmir/pyproject.toml | 43 +++++------------- 2 files changed, 104 insertions(+), 47 deletions(-) diff --git a/kmir/poetry.lock b/kmir/poetry.lock index c7faa7e64..a1cb13dbd 100644 --- a/kmir/poetry.lock +++ b/kmir/poetry.lock @@ -1,9 +1,10 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry and should not be changed by hand. [[package]] name = "arrow" version = "1.3.0" description = "Better dates & times for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -17,12 +18,13 @@ types-python-dateutil = ">=2.8.10" [package.extras] doc = ["doc8", "sphinx (>=7.0.0)", "sphinx-autobuild", "sphinx-autodoc-typehints", "sphinx_rtd_theme (>=1.3.0)"] -test = ["dateparser (==1.*)", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytz (==2021.1)", "simplejson (==3.*)"] +test = ["dateparser (>=1.0.0,<2.0.0)", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytz (==2021.1)", "simplejson (>=3.0.0,<4.0.0)"] [[package]] name = "attrs" version = "25.3.0" description = "Classes Without Boilerplate" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -42,6 +44,7 @@ tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] name = "autoflake" version = "2.3.1" description = "Removes unused imports and unused variables" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -57,6 +60,7 @@ tomli = {version = ">=2.0.1", markers = "python_version < \"3.11\""} name = "binaryornot" version = "0.4.4" description = "Ultra-lightweight pure Python package to check if a file is binary or text." +category = "main" optional = false python-versions = "*" files = [ @@ -71,6 +75,7 @@ chardet = ">=3.0.2" name = "black" version = "25.1.0" description = "The uncompromising code formatter." +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -117,6 +122,7 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2025.1.31" description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -128,6 +134,7 @@ files = [ name = "chardet" version = "5.2.0" description = "Universal encoding detector for Python 3" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -139,6 +146,7 @@ files = [ name = "charset-normalizer" version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -240,6 +248,7 @@ files = [ name = "classify-imports" version = "4.2.0" description = "Utilities for refactoring imports in python-like syntax." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -251,6 +260,7 @@ files = [ name = "click" version = "8.1.8" description = "Composable command line interface toolkit" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -265,6 +275,7 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "cmd2" version = "2.5.11" description = "cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -282,6 +293,7 @@ wcwidth = ">=0.2.10" name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -293,6 +305,7 @@ files = [ name = "coloredlogs" version = "15.0.1" description = "Colored terminal output for Python's logging module" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -310,6 +323,7 @@ cron = ["capturer (>=2.4)"] name = "cookiecutter" version = "2.6.0" description = "A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -331,6 +345,7 @@ rich = "*" name = "coverage" version = "7.7.1" description = "Code coverage measurement for Python" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -409,6 +424,7 @@ toml = ["tomli"] name = "exceptiongroup" version = "1.2.2" description = "Backport of PEP 654 (exception groups)" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -423,6 +439,7 @@ test = ["pytest (>=6)"] name = "execnet" version = "2.1.1" description = "execnet: rapid multi-Python deployment" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -437,6 +454,7 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] name = "filelock" version = "3.18.0" description = "A platform independent file lock." +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -453,6 +471,7 @@ typing = ["typing-extensions (>=4.12.2)"] name = "flake8" version = "7.1.2" description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" optional = false python-versions = ">=3.8.1" files = [ @@ -469,6 +488,7 @@ pyflakes = ">=3.2.0,<3.3.0" name = "flake8-bugbear" version = "24.12.12" description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle." +category = "dev" optional = false python-versions = ">=3.8.1" files = [ @@ -487,6 +507,7 @@ dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "pytest", name = "flake8-comprehensions" version = "3.16.0" description = "A flake8 plugin to help you write better list/set/dict comprehensions." +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -501,6 +522,7 @@ flake8 = ">=3,<3.2 || >3.2" name = "flake8-quotes" version = "3.4.0" description = "Flake8 lint for quotes." +category = "dev" optional = false python-versions = "*" files = [ @@ -515,6 +537,7 @@ setuptools = "*" name = "flake8-type-checking" version = "3.0.0" description = "A flake8 plugin for managing type-checking imports & forward references" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -530,6 +553,7 @@ flake8 = "*" name = "gnureadline" version = "8.2.13" description = "The standard Python readline extension statically linked against the GNU readline library." +category = "main" optional = false python-versions = "*" files = [ @@ -569,6 +593,7 @@ files = [ name = "graphviz" version = "0.20.3" description = "Simple Python interface for Graphviz" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -585,6 +610,7 @@ test = ["coverage", "pytest (>=7,<8.1)", "pytest-cov", "pytest-mock (>=3)"] name = "humanfriendly" version = "10.0" description = "Human friendly output for text interfaces using Python" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -597,13 +623,14 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve [[package]] name = "hypothesis" -version = "6.130.5" +version = "6.130.2" description = "A library for property-based testing" +category = "main" optional = false python-versions = ">=3.9" files = [ - {file = "hypothesis-6.130.5-py3-none-any.whl", hash = "sha256:c13e42ec7df7fdc45c44d0b39f1e429d2253e19a37041d927e092afa7645bfcf"}, - {file = "hypothesis-6.130.5.tar.gz", hash = "sha256:2cdcdd894adc390a688c8a1c08580c345a67ecf73e31d5bb51a7712acf7b747c"}, + {file = "hypothesis-6.130.2-py3-none-any.whl", hash = "sha256:b4c03a4a34466e76ecba518390e1759294607d44744e7e122477371b12deb03f"}, + {file = "hypothesis-6.130.2.tar.gz", hash = "sha256:979195ef58c309aab98d74b64bbcda5411d0bc86848c1bf89dbffb78c7c7e3ee"}, ] [package.dependencies] @@ -612,10 +639,10 @@ exceptiongroup = {version = ">=1.0.0", markers = "python_version < \"3.11\""} sortedcontainers = ">=2.1.0,<3.0.0" [package.extras] -all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.84)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.20)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2025.1)", "watchdog (>=4.0.0)"] +all = ["black (>=19.10b0)", "click (>=7.0)", "crosshair-tool (>=0.0.83)", "django (>=4.2)", "dpcontracts (>=0.4)", "hypothesis-crosshair (>=0.0.20)", "lark (>=0.10.1)", "libcst (>=0.3.16)", "numpy (>=1.19.3)", "pandas (>=1.1)", "pytest (>=4.6)", "python-dateutil (>=1.4)", "pytz (>=2014.1)", "redis (>=3.0.0)", "rich (>=9.0.0)", "tzdata (>=2025.1)", "watchdog (>=4.0.0)"] cli = ["black (>=19.10b0)", "click (>=7.0)", "rich (>=9.0.0)"] codemods = ["libcst (>=0.3.16)"] -crosshair = ["crosshair-tool (>=0.0.84)", "hypothesis-crosshair (>=0.0.20)"] +crosshair = ["crosshair-tool (>=0.0.83)", "hypothesis-crosshair (>=0.0.20)"] dateutil = ["python-dateutil (>=1.4)"] django = ["django (>=4.2)"] dpcontracts = ["dpcontracts (>=0.4)"] @@ -633,6 +660,7 @@ zoneinfo = ["tzdata (>=2025.1)"] name = "idna" version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -647,6 +675,7 @@ all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2 name = "importlib-metadata" version = "8.6.1" description = "Read metadata from Python packages" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -670,6 +699,7 @@ type = ["pytest-mypy"] name = "iniconfig" version = "2.1.0" description = "brain-dead simple config-ini parsing" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -681,6 +711,7 @@ files = [ name = "isort" version = "6.0.1" description = "A Python utility / library to sort Python imports." +category = "dev" optional = false python-versions = ">=3.9.0" files = [ @@ -696,6 +727,7 @@ plugins = ["setuptools"] name = "jinja2" version = "3.1.6" description = "A very fast and expressive template engine." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -713,6 +745,7 @@ i18n = ["Babel (>=2.7)"] name = "kframework" version = "7.1.229" description = "" +category = "main" optional = false python-versions = "<4.0,>=3.10" files = [ @@ -739,6 +772,7 @@ xdg-base-dirs = ">=6.0.1,<7.0.0" name = "linkify-it-py" version = "2.0.3" description = "Links recognition library with FULL unicode support." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -759,6 +793,7 @@ test = ["coverage", "pytest", "pytest-cov"] name = "markdown-it-py" version = "2.2.0" description = "Python port of markdown-it. Markdown parsing, done right!" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -785,6 +820,7 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -855,6 +891,7 @@ files = [ name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -866,6 +903,7 @@ files = [ name = "mdit-py-plugins" version = "0.4.2" description = "Collection of plugins for markdown-it-py" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -885,6 +923,7 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -896,6 +935,7 @@ files = [ name = "mypy" version = "1.15.0" description = "Optional static typing for Python" +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -949,6 +989,7 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -960,6 +1001,7 @@ files = [ name = "networkx" version = "3.4.2" description = "Python package for creating and manipulating graphs and networks" +category = "main" optional = false python-versions = ">=3.10" files = [ @@ -979,6 +1021,7 @@ test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] name = "packaging" version = "24.2" description = "Core utilities for Python packages" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -990,6 +1033,7 @@ files = [ name = "pathspec" version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1001,6 +1045,7 @@ files = [ name = "pep8-naming" version = "0.14.1" description = "Check PEP-8 naming conventions, plugin for flake8" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1015,6 +1060,7 @@ flake8 = ">=5.0.0" name = "platformdirs" version = "4.3.7" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1031,6 +1077,7 @@ type = ["mypy (>=1.14.1)"] name = "pluggy" version = "1.5.0" description = "plugin and hook calling mechanisms for python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1046,6 +1093,7 @@ testing = ["pytest", "pytest-benchmark"] name = "psutil" version = "5.9.8" description = "Cross-platform lib for process and system monitoring in Python." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -1074,6 +1122,7 @@ test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] name = "pybind11" version = "2.13.6" description = "Seamless operability between C++11 and Python" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1088,6 +1137,7 @@ global = ["pybind11-global (==2.13.6)"] name = "pycodestyle" version = "2.12.1" description = "Python style guide checker" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1099,6 +1149,7 @@ files = [ name = "pyflakes" version = "3.2.0" description = "passive checker of Python programs" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1110,6 +1161,7 @@ files = [ name = "pygments" version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1124,6 +1176,7 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pyperclip" version = "1.9.0" description = "A cross-platform clipboard module for Python. (Only handles plain text for now.)" +category = "main" optional = false python-versions = "*" files = [ @@ -1134,6 +1187,7 @@ files = [ name = "pyreadline3" version = "3.5.4" description = "A python implementation of GNU readline." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1148,6 +1202,7 @@ dev = ["build", "flake8", "mypy", "pytest", "twine"] name = "pytest" version = "8.3.5" description = "pytest: simple powerful testing with Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1170,6 +1225,7 @@ dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments name = "pytest-cov" version = "6.0.0" description = "Pytest plugin for measuring coverage." +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1188,6 +1244,7 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"] name = "pytest-mock" version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1205,6 +1262,7 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] name = "pytest-xdist" version = "3.6.1" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1225,6 +1283,7 @@ testing = ["filelock"] name = "python-dateutil" version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1239,6 +1298,7 @@ six = ">=1.5" name = "python-slugify" version = "8.0.4" description = "A Python slugify application that also handles Unicode" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1256,6 +1316,7 @@ unidecode = ["Unidecode (>=1.1.1)"] name = "pyupgrade" version = "3.19.1" description = "A tool to automatically upgrade syntax for newer versions." +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1270,6 +1331,7 @@ tokenize-rt = ">=6.1.0" name = "pyyaml" version = "6.0.2" description = "YAML parser and emitter for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1332,6 +1394,7 @@ files = [ name = "requests" version = "2.32.3" description = "Python HTTP for Humans." +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1353,6 +1416,7 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rich" version = "13.9.4" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" +category = "main" optional = false python-versions = ">=3.8.0" files = [ @@ -1370,13 +1434,14 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "setuptools" -version = "78.1.0" +version = "77.0.3" description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" optional = false python-versions = ">=3.9" files = [ - {file = "setuptools-78.1.0-py3-none-any.whl", hash = "sha256:3e386e96793c8702ae83d17b853fb93d3e09ef82ec62722e61da5cd22376dcd8"}, - {file = "setuptools-78.1.0.tar.gz", hash = "sha256:18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54"}, + {file = "setuptools-77.0.3-py3-none-any.whl", hash = "sha256:67122e78221da5cf550ddd04cf8742c8fe12094483749a792d56cd669d6cf58c"}, + {file = "setuptools-77.0.3.tar.gz", hash = "sha256:583b361c8da8de57403743e756609670de6fb2345920e36dc5c2d914c319c945"}, ] [package.extras] @@ -1386,12 +1451,13 @@ cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.14.*)", "pytest-mypy"] +type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (>=1.14.0,<1.15.0)", "pytest-mypy"] [[package]] name = "six" version = "1.17.0" description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1403,6 +1469,7 @@ files = [ name = "sortedcontainers" version = "2.4.0" description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set" +category = "main" optional = false python-versions = "*" files = [ @@ -1414,6 +1481,7 @@ files = [ name = "text-unidecode" version = "1.3" description = "The most basic Text::Unidecode port" +category = "main" optional = false python-versions = "*" files = [ @@ -1425,6 +1493,7 @@ files = [ name = "textual" version = "0.27.0" description = "Modern Text User Interface framework" +category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -1445,6 +1514,7 @@ dev = ["aiohttp (>=3.8.1)", "click (>=8.1.2)", "msgpack (>=1.0.3)"] name = "tokenize-rt" version = "6.1.0" description = "A wrapper around the stdlib `tokenize` which roundtrips." +category = "dev" optional = false python-versions = ">=3.9" files = [ @@ -1456,6 +1526,7 @@ files = [ name = "tomli" version = "2.2.1" description = "A lil' TOML parser" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1497,6 +1568,7 @@ files = [ name = "types-python-dateutil" version = "2.9.0.20241206" description = "Typing stubs for python-dateutil" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1506,19 +1578,21 @@ files = [ [[package]] name = "typing-extensions" -version = "4.13.0" +version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" +category = "main" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.13.0-py3-none-any.whl", hash = "sha256:c8dd92cc0d6425a97c18fbb9d1954e5ff92c1ca881a309c45f06ebc0b79058e5"}, - {file = "typing_extensions-4.13.0.tar.gz", hash = "sha256:0a4ac55a5820789d87e297727d229866c9650f6521b64206413c4fbada24d95b"}, + {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, + {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] [[package]] name = "uc-micro-py" version = "1.0.3" description = "Micro subset of unicode data files for linkify-it-py projects." +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1533,6 +1607,7 @@ test = ["coverage", "pytest", "pytest-cov"] name = "urllib3" version = "2.3.0" description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1550,6 +1625,7 @@ zstd = ["zstandard (>=0.18.0)"] name = "wcwidth" version = "0.2.13" description = "Measures the displayed width of unicode strings in a terminal" +category = "main" optional = false python-versions = "*" files = [ @@ -1561,6 +1637,7 @@ files = [ name = "xdg-base-dirs" version = "6.0.2" description = "Variables defined by the XDG Base Directory Specification" +category = "main" optional = false python-versions = "<4.0,>=3.10" files = [ @@ -1572,6 +1649,7 @@ files = [ name = "zipp" version = "3.21.0" description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" optional = false python-versions = ">=3.9" files = [ @@ -1590,4 +1668,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "5e1cf997ea2d184fa59d530d6f0e1299a0cb99cb3f7c0d0a21ae04d16bd7ad12" +content-hash = "f58750f63768196f9e102e42e3fc879d798855b5ef3df924f24bd56250e2ddc7" diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 7fd251890..323f90b1a 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,28 +4,26 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.111" +version = "0.3.109" description = "" authors = [ "Runtime Verification, Inc. ", ] -packages = [ - { include = "kmir", from = "src" } -] -include = [ - "dist/semantics/mir-semantics/**/*" -] +[tool.poetry.scripts] +parse = "kmir.parse.__main__:main" +kmir = "kmir.__main__:main" + +[tool.poetry.plugins.kdist] +mir-semantics = "kmir.kdist.plugin" + +[tool.poetry.plugins.pytest11] +pytest-kmir = "kmir.testing.fixtures" -# Core runtime dependencies [tool.poetry.dependencies] python = "^3.10" kframework = "7.1.229" -# Development dependencies (not installed in production) -[tool.poetry.group.dev] -optional = true - [tool.poetry.group.dev.dependencies] autoflake = "*" black = "*" @@ -43,25 +41,6 @@ pytest-mock = "*" pytest-xdist = "*" pyupgrade = "*" -[tool.poetry.group.test] -optional = true - -[tool.poetry.group.test.dependencies] -pytest = "*" -pytest-cov = "*" -pytest-mock = "*" -pytest-xdist = "*" - -[tool.poetry.scripts] -parse = "kmir.parse.__main__:main" -kmir = "kmir.__main__:main" - -[tool.poetry.plugins.kdist] -mir-semantics = "kmir.kdist.plugin" - -[tool.poetry.plugins.pytest11] -pytest-kmir = "kmir.testing.fixtures" - [tool.isort] profile = "black" line_length = 120 @@ -79,4 +58,4 @@ line-length = 120 skip-string-normalization = true [tool.mypy] -disallow_untyped_defs = true \ No newline at end of file +disallow_untyped_defs = true From 10c8bfc64edf72b6ae645713d585ebb43591bac1 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 13:44:38 -0600 Subject: [PATCH 28/84] Updating flake nix to name package 'kmir' from 'mir-semantics' --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 72623f89b..8fe1d68ad 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "mir-semantics - "; + description = "kmir - "; inputs = { k-framework.url = "github:runtimeverification/k/v7.1.229"; nixpkgs.follows = "k-framework/nixpkgs"; @@ -15,7 +15,7 @@ poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { pkgs = prev; }; in { - mir-semantics = poetry2nix.mkPoetryApplication { + kmir = poetry2nix.mkPoetryApplication { python = prev.python310; projectDir = ./kmir; overrides = poetry2nix.overrides.withDefaults @@ -41,8 +41,8 @@ }; in { packages = rec { - inherit (pkgs) mir-semantics; - default = mir-semantics; + inherit (pkgs) kmir; + default = kmir; }; }) // { overlay = nixpkgs.lib.composeManyExtensions allOverlays; From b7b24d8bae0955f94a89020bd29a9ca3159c2e17 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 13:45:17 -0600 Subject: [PATCH 29/84] Revert to master --- kmir/src/kmir/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index 91f6ba837..0e5933cd0 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.111' +VERSION: Final = '0.3.109' From d440e7decd39c972ba6f75cd2911ed442c386d70 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 13:46:21 -0600 Subject: [PATCH 30/84] Dropping separate rust repo --- result | 1 + rust-verification-proofs/README.md | 95 - .../maximum-proof/README.md | 98 - .../maximum-proof/main-max-with-lt.rs | 18 - .../maximum-proof/main-max-with-lt.smir.dot | 135 - .../maximum-proof/main-max-with-lt.smir.json | 2676 --------------- .../maximum-proof/maximum-spec.k | 73 - .../unchecked_add/unchecked-add.rs | 14 - .../unchecked_add/unchecked-add.smir.dot | 140 - .../unchecked_add/unchecked-add.smir.json | 2969 ----------------- .../unchecked_add/unchecked-op-spec.k | 75 - .../unchecked_mul/unchecked-mul.rs | 14 - .../unchecked_mul/unchecked-mul.smir.dot | 140 - .../unchecked_mul/unchecked-mul.smir.json | 2969 ----------------- .../unchecked_mul/unchecked-op-spec.k | 73 - .../unchecked_neg/unchecked-neg.rs | 12 - .../unchecked_neg/unchecked-neg.smir.dot | 137 - .../unchecked_neg/unchecked-neg.smir.json | 2339 ------------- .../unchecked_neg/unchecked-op-spec.k | 71 - .../unchecked_shl/unchecked-op-spec.k | 73 - .../unchecked_shl/unchecked-shl.rs | 13 - .../unchecked_shl/unchecked-shl.smir.dot | 127 - .../unchecked_shl/unchecked-shl.smir.json | 2353 ------------- .../unchecked_shr/unchecked-op-spec.k | 73 - .../unchecked_shr/unchecked-shr.rs | 13 - .../unchecked_shr/unchecked-shr.smir.dot | 127 - .../unchecked_shr/unchecked-shr.smir.json | 2353 ------------- .../unchecked_sub/unchecked-op-spec.k | 73 - .../unchecked_sub/unchecked-sub.rs | 14 - .../unchecked_sub/unchecked-sub.smir.dot | 140 - .../unchecked_sub/unchecked-sub.smir.json | 2969 ----------------- 31 files changed, 1 insertion(+), 20376 deletions(-) create mode 120000 result delete mode 100644 rust-verification-proofs/README.md delete mode 100644 rust-verification-proofs/maximum-proof/README.md delete mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.rs delete mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot delete mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json delete mode 100644 rust-verification-proofs/maximum-proof/maximum-spec.k delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.rs delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.dot delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.json delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.rs delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.rs delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.rs delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.rs delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.rs delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json diff --git a/result b/result new file mode 120000 index 000000000..84a0bb600 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/7p32kchz5c5ssnmy6s32nylx3adwi86i-python3.10-kmir-0.3.111 \ No newline at end of file diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md deleted file mode 100644 index 25ed9b099..000000000 --- a/rust-verification-proofs/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Formal Rust Code Verification Using KMIR - -This subrepository contains a collection of programs and specifications that aim to illustrate how KMIR can be used to validate the properties of Rust programs and the Rust language itself. The code made available in this repository was developed taking as references the challenges present on the [Verify Rust Standard Library Effort](https://model-checking.github.io/verify-rust-std/intro.html). - -## Table of Contents - - -- [Project Setup](#project-setup) -- [Proof 1: Proving a Maximum Finding Function That only Uses `lower-than (<)`](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) -- [Proof 2: Proving Unsafe Arithmetic Operations](#proof-2-proving-unsafe-arithmetic-operations) - -## Project Setup - -In order to run and explore the proofs elaborated here, make sure that KMIR can be locally executed in your machine following the instructions available in [this repository's README file](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs). - -[Be sure to have Rust installed](https://www.rust-lang.org/tools/install) in your machine, have the specific components and toolchain necessary to run KMIR. To guarantee it, with `rustup` installed, run the following commands: - -```bash -rustup component add rust-src rustc-dev llvm-tools-preview -rustup toolchain install nightly-2024-11-29 -rustup default nightly-2024-11-29 -``` - -**(Optional)** Additionally, if you would like to build your own code specifications to be proven with KMIR, install the [Rust Stable MIR Pretty Printing](https://github.com/runtimeverification/stable-mir-json/tree/20820cc6abd8fd22769931a3f8754ee35ab24c05) tool. It won't be necessary to install it if you'd like to understand how KMIR works and to execute its proofs, but it is needed currently to help us traverse program states, as seen in the [steps needed to achieve Proof 1's specification](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). To install the Rust Stable MIR Pretty Printing tool, in the root of this project, run: - -```bash -git submodule update --init --recursive -make stable-mir-json -``` - -The usage of this tool will be abstracted in the future, removing the need to construct claims manually. - -## Proof 1: Proving a Maximum Finding Function That only Uses `lower-than` - -Considering a function that receives three integer arguments, this function should return the highest value among them. Assertions can be used to enforce this condition, and an example code that tests this function can be seen below: - -```Rust -fn main() { - - let a:usize = 42; - let b:usize = -43; - let c:usize = 0; - - let result = maximum(a, b, c); - - assert!(result >= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: usize, b: usize, c: usize) -> usize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} -``` - -Notice in this case that `a`, `b`, and `c` are concrete, fixed values. To turn the parameters of `maximum` into symbolic variables, we can obtain the representation of the function call to `maximum` executed using KMIR and then replace the concrete values of these variables with symbolic values. Furthermore, the assertion specified in the code can be manually translated as a requirement that should be met by the symbolic variables, meaning that any value that they can assume must respect the conditions contained in the specification. Following this approach, we can utilize KMIR to give us formal proof that, for any valid `isize` input, the maximum value among the three parameters will be returned. - -Information on how the specification was created can be found in the longer [description of `maximum-proof`](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). - -To run this proof in your terminal from this folder, execute: - -```Bash -cd maximum-proof -poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof -``` - -## Proof 2: Proving Unsafe Arithmetic Operations - -The proofs in this section concern a section of the challenge of securing [Safety of Methods for Numeric Primitive Types](https://model-checking.github.io/verify-rust-std/challenges/0011-floats-ints.html#challenge-11-safety-of-methods-for-numeric-primitive-types) of the Verify Rust Standard Library Effort. Here, we implement proof of concepts of how KMIR can be used to prove the following unsafe methods according to their undefined behaviors: `unchecked_add`, `unchecked_sub`, `unchecked_mul`, `unchecked_shl`, `unchecked_shr`, and `unchecked_neg`. - -For these functions, the proofs were carried out using variables of the `i16` integer type, and the criteria for triggering undefined behaviors for these methods were obtained in the [i16 type documentation page](https://doc.rust-lang.org/std/primitive.i16.html). - -To obtain the specifications that prove the presence/absence of undefined behavior for these functions, analogous processes to the ones discussed in [Proof 1](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) were performed. - -For an illustration of how we specify the requirements of the proof, which, in this case, are the assertions that would help us detect the presence/absence of undefined behavior in the unsafe methods, let's explore how we can prove safety conditions for the `unchecked_add` operation. Consider the following function: - -https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-add.rs#L11-L14 - -`unchecked_op` is a function that receives two `i16` arguments and executes an `unchecked_add` of the first parameter by the second, returning an `i16` value resulting from this operation. According to the [documentation of the unchecked_add function for the i16 primitive type](https://doc.rust-lang.org/std/primitive.i16.html#method.unchecked_add), considering the safety of this function "This results in undefined behavior when `self + rhs > i16::MAX or self + rhs < i16::MIN`, i.e. when `checked_add` would return `None`". By the process further disclosed in Proof 1, we can obtain a valid representation of a function call for `unchecked_op` and modify the variable values to be symbolic. The next step is to define the conditions these values should meet to verify safety conditions elaborated for `unchecked_add`. To this goal, see the following code snippet: - -https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-op-spec.k#L66-L73 - -The parameters for `unchecked_add` in this specification for KMIR are represented as A and B, which now are symbolic values. To specify the goal of our verification process, we implemented the above code snippet into the specification, which adds a requirement to the execution of our symbolic execution engine. In other words, our proof will only be successful if the specified requirements above are respected. - -In this `requires` clause, first, we use the semantics of K to specify A and B's boundaries, as `i16`s: `0 -Int (1 <= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: usize, b: usize, c: usize) -> usize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} -``` - -We want to prove a property of `maximum`: -- When called with `a`, `b`, and `c`, -- the `result` will be greater or equal all of the arguments, -- and equal to one (or more) of them. - -The `main` program above states this using some concrete values of `a`, `b`, and `c`. We will run this program to construct a general symbolic claim and prove it. - -In a future version, we will be able to start directly with the `maximum` function call and provide symbolic arguments to it. This will save some manual work setting up the claim file and fits the target of proving based on property tests. - -## Extracting Stable MIR for the program - -Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. (Run the below commmands from the `mir-semantics/rust-verification-proofs/maximum-proof/` directory). - -```shell -cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs -``` -The Stable MIR for the program can also be rendered as a graph, using the `--dot` option. This creates `main-max-with-lt.smir.dot`. - -```shell -cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs -``` -## Constructing the claim by executing `main` to certain points -Through concrete execution of the parsed K program we can interrupt the execution after a given number of rewrite steps to inspect the intermediate state. This will help us with writing our claim manually until the process is automated. - -1. The program (`main`) reaches the call to `maximum` after 22 steps. - The following command runs it and displays the resulting program state. - - ```shell - poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S - ``` - - Arguments `a`, `b`, and `c` are initialised to `Integer`s as `locals[1]` to `locals[3]` - - A `call` terminator calling function `ty(25)` is executed next (front of the `k` cell) - - The function table contains `ty(25) -> "maximum" code. - - Other state (how `main` continues, its other local variables, and some internal functions) is relevant to the proof we want to perform. -2. The program executes for a total of 92 steps to reach the point where it `return`s from `maximum`. - The following command runs it and displays the resulting program state. - - ```shell - poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S - ``` - - The value `locals[0]` is now set to an `Integer`. This will be the target of our assertions. - - A `return` terminator is executed next (front of the `k` cell), it will return `locals[0]` - - It should be an `Integer` with the desired properties as stated above - -State 1. defines our start state for the claim. Irrelevant parts are elided (replaced by variables). -* The code of the `maximum` function in the `functions` table needs to be kept. We also keep its identifier `ty(25)`. Other functions can be removed (we won't perform a return). -* The `call` terminator is kept, calling `ty(25)` with arguments from `locals[1,2,3]`. `target` is modified to be `noBasicBlockIdx` to force termination of the prover (no block to jump back to). -* The four locals `0` - `3` are required in their original order to provide the function arguments. The values of `a`, `b`, and `c` in locals `1` - `3` are replaced with symbolic variables used in the proof. -* We could keep all other locals but do not have to (however it is important that the list of locals has a known length). -* `main`s other details in `currentFrame` are irrelevant and elided. - - -State 2. is the end state, where all that matters is the returned value. - -* The `locals` list should contain this `?RESULT` value at index `0` -* The `?RESULT` value should have the properties stated (equivalent to the assertion in `main`) -* Because of the modified `target`, the program should end, i.e., have an `#EndProgram` in the `k` cell. - -The above is written as a _claim_ in K framework language into a `maximum-spec.k` file. -Most of the syntax can be copied from the output of the `kmir run` commands above, and irrelevant parts replaced by `_` (LHS) or `?_` (RHS). - -Alternatively, it is possible to construct a claim that the entire rest of the program after initialising the variables will result in the desired `?RESULT`, i.e., the assertion in `main` is executed successfully and the program ends in `#EndProgram` after checking it. This would require more steps. - -## Running the prover on the claim and viewing the proof -Now that we have constructed claim, we can run use the KMIR verifier to perform symbollic execution, and can view the state of proof through the KMIR proof viewer. -```shell -poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof -``` - -The proof steps are saved in the `$PWD/proof` directory for later inspection using `kmir prove view`. This is especially important when the proof does _not_ succeed immediately. - -```shell -poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof -``` diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs deleted file mode 100644 index 448c2cb9d..000000000 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs +++ /dev/null @@ -1,18 +0,0 @@ - -fn main() { - - let a:usize = 42; - let b:usize = 22; - let c:usize = 0; - - let result = maximum(a, b, c); - - assert!(result >= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: usize, b: usize, c: usize) -> usize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot deleted file mode 100644 index 6da5f7ff3..000000000 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot +++ /dev/null @@ -1,135 +0,0 @@ -digraph { - label="main_max_with_lt"; - node [shape=rectangle]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; - Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - subgraph cluster_0 { - label="main"; - style="filled"; - color=palegreen; - X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="4"]; - X37252ea5c5b3ce2a_0 [label="1 <- Use(const :: usize)\l2 <- Use(const :: usize)\l3 <- Use(const :: usize)\lCall\l"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; - X37252ea5c5b3ce2a_1 [label="5 <- Ge(cp(4), cp(1))\lSwitchInt mv(5)\l"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; - X37252ea5c5b3ce2a_2 [label="6 <- Ge(cp(4), cp(2))\lSwitchInt mv(6)\l"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; - X37252ea5c5b3ce2a_3 [label="7 <- Ge(cp(4), cp(3))\lSwitchInt mv(7)\l"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_4 [label="8 <- Eq(cp(4), cp(1))\lSwitchInt mv(8)\l"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_5 [label="9 <- Eq(cp(4), cp(2))\lSwitchInt mv(9)\l"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_6 [label="10 <- Eq(cp(4), cp(3))\lSwitchInt mv(10)\l"]; - X37252ea5c5b3ce2a_7 [label="Call\l"]; - X37252ea5c5b3ce2a_8 [label="Return\l"]; - } - X37252ea5c5b3ce2a_0 -> X9585eeb1b7d3a83d_0 [label="cp(1),cp(2),cp(3)"]; - X37252ea5c5b3ce2a_7 -> Xac08878333d72e42_0 [label="const :: &str"]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X5c233e009f84aa6c_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X83f8b52e3f0ef4c5_0 -> X83f8b52e3f0ef4c5_1 [label="0"]; - X83f8b52e3f0ef4c5_0 [label="Call\l"]; - X83f8b52e3f0ef4c5_1 -> X83f8b52e3f0ef4c5_2 [label="2"]; - X83f8b52e3f0ef4c5_1 [label="Call\l"]; - X83f8b52e3f0ef4c5_2 [label="Return\l"]; - } - X83f8b52e3f0ef4c5_0 -> X5153bc83e282e268_0 [label="mv(1),const :: ()"]; - X83f8b52e3f0ef4c5_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_3 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X88af70ac7219a434_0 -> X88af70ac7219a434_1 [label="5"]; - X88af70ac7219a434_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; - X88af70ac7219a434_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X88af70ac7219a434_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; - subgraph cluster_4 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X2aeea2bef42114da_0 -> X2aeea2bef42114da_1 [label="0"]; - X2aeea2bef42114da_0 [label="Call\l"]; - X2aeea2bef42114da_1 [label="Return\l"]; - } - X2aeea2bef42114da_0 -> X58ae416f9afa06ac_0 [label="mv(*1),mv(2)"]; - subgraph cluster_5 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X5153bc83e282e268_0 -> X5153bc83e282e268_1 [label="0"]; - X5153bc83e282e268_0 [label="Call\l"]; - X5153bc83e282e268_1 [label="Return\l"]; - } - X5153bc83e282e268_0 -> X5153bc83e282e268_0: 1 [label=""]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - Xf1c2e3e2362b71b1_0 -> Xf1c2e3e2362b71b1_1 [label="3"]; - Xf1c2e3e2362b71b1_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; - Xf1c2e3e2362b71b1_1 -> Xf1c2e3e2362b71b1_2 [label="2"]; - Xf1c2e3e2362b71b1_1 [label="Storage Dead _4\lCall\l"]; - Xf1c2e3e2362b71b1_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - Xf1c2e3e2362b71b1_0 -> X83f8b52e3f0ef4c5_0 [label="mv(4)"]; - Xf1c2e3e2362b71b1_1 -> X5c233e009f84aa6c_0 [label="mv(3)"]; - subgraph cluster_7 { - label="maximum"; - style="filled"; - color=palegreen; - X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_2 [label="0"]; - X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_1 [label="other"]; - X9585eeb1b7d3a83d_0 [label="5 <- Lt(cp(1), cp(2))\lSwitchInt mv(5)\l"]; - X9585eeb1b7d3a83d_1 -> X9585eeb1b7d3a83d_3; - X9585eeb1b7d3a83d_1 [label="4 <- Use(cp(2))\lGoto\l"]; - X9585eeb1b7d3a83d_2 -> X9585eeb1b7d3a83d_3; - X9585eeb1b7d3a83d_2 [label="4 <- Use(cp(1))\lGoto\l"]; - X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_5 [label="0"]; - X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_4 [label="other"]; - X9585eeb1b7d3a83d_3 [label="7 <- Use(cp(4))\l6 <- Lt(mv(7), cp(3))\lSwitchInt mv(6)\l"]; - X9585eeb1b7d3a83d_4 -> X9585eeb1b7d3a83d_6; - X9585eeb1b7d3a83d_4 [label="0 <- Use(cp(3))\lGoto\l"]; - X9585eeb1b7d3a83d_5 -> X9585eeb1b7d3a83d_6; - X9585eeb1b7d3a83d_5 [label="0 <- Use(cp(4))\lGoto\l"]; - X9585eeb1b7d3a83d_6 [label="Return\l"]; - } - subgraph cluster_8 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_3 [label="Cleanup"]; - X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_1 [label="0"]; - X58ae416f9afa06ac_0 [label="3 <- &mut 1\lCall\l"]; - X58ae416f9afa06ac_1 -> X58ae416f9afa06ac_2; - X58ae416f9afa06ac_1 [label="Drop 1\l"]; - X58ae416f9afa06ac_2 [label="Return\l"]; - X58ae416f9afa06ac_3 -> X58ae416f9afa06ac_4; - X58ae416f9afa06ac_3 [label="Drop 1\l"]; - X58ae416f9afa06ac_4 [label="Resume\l"]; - } - X58ae416f9afa06ac_0 -> Xf1c2e3e2362b71b1_0 [label="mv(3),mv(2)"]; - subgraph cluster_9 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xefb68cd7a0d5be14_0 [label="Return\l"]; - } -} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json deleted file mode 100644 index 02182bb8e..000000000 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json +++ /dev/null @@ -1,2676 +0,0 @@ -{ - "name": "main_max_with_lt", - "crate_id": 5373935543796547206, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 97, - 32, - 38, - 38, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 98, - 32, - 38, - 38, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 99, - 32, - 38, - 38, - 10, - 32, - 32, - 32, - 32, - 40, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 97, - 32, - 124, - 124, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 98, - 32, - 124, - 124, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 99, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 25, - { - "NormalSym": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E" - } - ], - [ - 27, - { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" - } - ], - [ - 33, - { - "NoOpSym": "" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h8f98b99a20edb596E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E", - "mono_item_kind": { - "MonoItemFn": { - "name": "maximum", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 69 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [] - } - } - } - ] - }, - "span": 71 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } - }, - "span": 70 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } - }, - "span": 70 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 7, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 73 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 4 - } - } - }, - "span": 73 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "span": 76 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 75 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "span": 77 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 75 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 - } - } - ], - "locals": [ - { - "ty": 26, - "span": 79, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 80, - "mutability": "Not" - }, - { - "ty": 26, - "span": 81, - "mutability": "Not" - }, - { - "ty": 26, - "span": 82, - "mutability": "Not" - }, - { - "ty": 26, - "span": 83, - "mutability": "Not" - }, - { - "ty": 29, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 74, - "mutability": "Mut" - } - ], - "arg_count": 3, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "c", - "source_info": { - "span": 82, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "max_ab", - "source_info": { - "span": 83, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 84 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 10 - } - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 22, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } - } - } - } - ] - }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 12 - } - } - } - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 2 - } - } - }, - "span": 55 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 3 - } - } - }, - "span": 56 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 4 - } - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 58 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 8, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 8 - } - } - }, - "span": 58 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 9, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 8 - } - } - }, - "span": 59 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 60 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 10, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 8 - } - } - }, - "span": 60 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 13 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 110, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 14 - } - } - } - ], - "destination": { - "local": 11, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 64, - "mutability": "Not" - }, - { - "ty": 26, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 66, - "mutability": "Not" - }, - { - "ty": 26, - "span": 67, - "mutability": "Not" - }, - { - "ty": 29, - "span": 55, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 59, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 61, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 64, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 65, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 66, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 67, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hd99c80c4d0898bdeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h739869090782dad0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 29, - { - "RigidTy": "Bool" - } - ], - [ - 26, - { - "RigidTy": { - "Uint": "Usize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/maximum-proof/maximum-spec.k b/rust-verification-proofs/maximum-proof/maximum-spec.k deleted file mode 100644 index ee506eb8f..000000000 --- a/rust-verification-proofs/maximum-proof/maximum-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module MAXIMUM-SPEC - imports KMIR - - claim [maximum-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 50 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 25 ) , // <- this is the reference to `maximum` - id: mirConstId ( 9 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 25 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 64 , false ) , ty ( 26 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 64 , false ) , ty ( 26 ) , _ ) ) - ListItem ( typedValue ( Integer ( C , 64 , false ) , ty ( 26 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 64, false), ty ( 26 ) , ?_ )) - ?_ - - - _ => ?_ - - ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) - - - requires // invariant of the `Integer` constructor - 0 <=Int A - andBool A i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_add(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot b/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot deleted file mode 100644 index 079803cdd..000000000 --- a/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_add"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - subgraph cluster_0 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_1 [label="_0"]; - Xecf30c325a77cae0_0 [label="Call\l"]; - Xecf30c325a77cae0_1 [label="Return\l"]; - } - Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_0: _1 [label=""]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xf28f42e91011344a_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X4f9055e3140841d0_0 -> X4f9055e3140841d0_1 [label="_5"]; - X4f9055e3140841d0_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X4f9055e3140841d0_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X4f9055e3140841d0_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_3 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X3d323724ddeb8015_0 -> X3d323724ddeb8015_1 [label="_0"]; - X3d323724ddeb8015_0 [label="Call\l"]; - X3d323724ddeb8015_1 -> X3d323724ddeb8015_2 [label="_2"]; - X3d323724ddeb8015_1 [label="Call\l"]; - X3d323724ddeb8015_2 [label="Return\l"]; - } - X3d323724ddeb8015_0 -> Xecf30c325a77cae0_0 [label="_1,const :: ()"]; - X3d323724ddeb8015_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_4 { - label="main"; - style="filled"; - color=palegreen; - X899bfc87e7e82e90_0 -> X899bfc87e7e82e90_1 [label="_3"]; - X899bfc87e7e82e90_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - X899bfc87e7e82e90_1 -> X899bfc87e7e82e90_2; - X899bfc87e7e82e90_1 [label="_6 <- chkd-Add(_1, _2)\lAssert _6.1 == false\l"]; - X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_6 [label="0"]; - X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_3 [label="other"]; - X899bfc87e7e82e90_2 [label="_5 <- Use(_6.0)\l_4 <- Lt(_5, const :: i16)\lSwitchInt _4\l"]; - X899bfc87e7e82e90_3 -> X899bfc87e7e82e90_4; - X899bfc87e7e82e90_3 [label="_9 <- chkd-Add(_1, _2)\lAssert _9.1 == false\l"]; - X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_6 [label="0"]; - X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_5 [label="other"]; - X899bfc87e7e82e90_4 [label="_8 <- Use(_9.0)\l_7 <- Gt(_8, const :: i16)\lSwitchInt _7\l"]; - X899bfc87e7e82e90_5 [label="Return\l"]; - X899bfc87e7e82e90_6 [label="Call\l"]; - } - X899bfc87e7e82e90_0 -> X7464f1e6ba435b2a_0 [label="_1,_2"]; - X899bfc87e7e82e90_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_5 { - label="core::num::::unchecked_add::prec\nondition_check"; - style="filled"; - color=lightgray; - X3f7834dda050e10_0 -> X3f7834dda050e10_2 [label="0"]; - X3f7834dda050e10_0 -> X3f7834dda050e10_1 [label="other"]; - X3f7834dda050e10_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Add(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - X3f7834dda050e10_1 [label="Call\l"]; - X3f7834dda050e10_2 [label="Return\l"]; - } - X3f7834dda050e10_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_3 [label="Cleanup"]; - Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_1 [label="_0"]; - Xade51bc3a8f52008_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xade51bc3a8f52008_1 -> Xade51bc3a8f52008_2; - Xade51bc3a8f52008_1 [label="Drop _1\l"]; - Xade51bc3a8f52008_2 [label="Return\l"]; - Xade51bc3a8f52008_3 -> Xade51bc3a8f52008_4; - Xade51bc3a8f52008_3 [label="Drop _1\l"]; - Xade51bc3a8f52008_4 [label="Resume\l"]; - } - Xade51bc3a8f52008_0 -> X48be982d2a4cc59b_0 [label="_3,_2"]; - subgraph cluster_7 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X9c80f3743f4f0c10_0 -> X9c80f3743f4f0c10_1 [label="_0"]; - X9c80f3743f4f0c10_0 [label="Call\l"]; - X9c80f3743f4f0c10_1 [label="Return\l"]; - } - X9c80f3743f4f0c10_0 -> Xade51bc3a8f52008_0 [label="_1*,_2"]; - subgraph cluster_8 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X7464f1e6ba435b2a_0 -> X7464f1e6ba435b2a_1 [label="_0"]; - X7464f1e6ba435b2a_0 [label="Call\l"]; - X7464f1e6ba435b2a_1 [label="Return\l"]; - } - X7464f1e6ba435b2a_0 -> X354cc96a778c463_0 [label="_1,_2"]; - subgraph cluster_9 { - label="core::num::::unchecked_add"; - style="filled"; - color=lightgray; - X354cc96a778c463_0 -> X354cc96a778c463_2 [label="0"]; - X354cc96a778c463_0 -> X354cc96a778c463_1 [label="other"]; - X354cc96a778c463_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - X354cc96a778c463_1 -> X354cc96a778c463_2 [label="_4"]; - X354cc96a778c463_1 [label="Call\l"]; - X354cc96a778c463_2 [label="Storage Dead _3\l_0 <- AddUnchecked(_1, _2)\lReturn\l"]; - } - X354cc96a778c463_1 -> X3f7834dda050e10_0 [label="_1,_2"]; - subgraph cluster_10 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X5f7c0242b1a5f905_0 [label="Return\l"]; - } - subgraph cluster_11 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X48be982d2a4cc59b_0 -> X48be982d2a4cc59b_1 [label="_3"]; - X48be982d2a4cc59b_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X48be982d2a4cc59b_1 -> X48be982d2a4cc59b_2 [label="_2"]; - X48be982d2a4cc59b_1 [label="Storage Dead _4\lCall\l"]; - X48be982d2a4cc59b_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X48be982d2a4cc59b_0 -> X3d323724ddeb8015_0 [label="_4"]; - X48be982d2a4cc59b_1 -> Xf28f42e91011344a_0 [label="_3"]; -} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json deleted file mode 100644 index 922645c86..000000000 --- a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json +++ /dev/null @@ -1,2969 +0,0 @@ -{ - "name": "unchecked_add", - "crate_id": 1100512358528492573, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 97, - 100, - 100, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 40, - 97, - 32, - 43, - 32, - 98, - 32, - 60, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 65, - 88, - 41, - 32, - 38, - 38, - 32, - 40, - 97, - 32, - 43, - 32, - 98, - 32, - 62, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 73, - 78, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E" - } - ], - [ - 35, - { - "NoOpSym": "" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE" - } - ], - [ - 24, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - }, - { - "ty": 31, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17ha7140c6faa1714efE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 70 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 11 - } - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": "Return", - "span": 71 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 74, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 74, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 75 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 93, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 96, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 97, - "mutability": "Not" - }, - { - "ty": 23, - "span": 98, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 97, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 98, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_sum", - "source_info": { - "span": 99, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 100 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 62, - "mutability": "Not" - }, - { - "ty": 23, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_add4main17hd8e1c5b7245124d4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 13 - } - } - } - } - ] - }, - "span": 78 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 213, - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 79 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 76, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 12 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 80 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Constant": { - "span": 82, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255, - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 15 - } - } - } - ] - } - ] - }, - "span": 81 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 3 - } - } - }, - "span": 81 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 83 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 83 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - ] - } - ] - }, - "span": 84 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 5 - } - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 87, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 58, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 18 - } - } - } - ], - "destination": { - "local": 10, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 87 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 89, - "mutability": "Not" - }, - { - "ty": 23, - "span": 90, - "mutability": "Not" - }, - { - "ty": 23, - "span": 91, - "mutability": "Not" - }, - { - "ty": 21, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 87, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 90, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 91, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 92 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "AddUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 23, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k deleted file mode 100644 index cc8f79d0c..000000000 --- a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k +++ /dev/null @@ -1,75 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - - requires // i16 invariants - 0 -Int (1 < i16::MAX) && (a * b < i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_mul(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot deleted file mode 100644 index 1fd26d6eb..000000000 --- a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_mul"; - node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X8f01db0e36395c71_0 -> X8f01db0e36395c71_1 [label="_0"]; - X8f01db0e36395c71_0 [label="Call\l"]; - X8f01db0e36395c71_1 [label="Return\l"]; - } - X8f01db0e36395c71_0 -> X8f01db0e36395c71_0: _1 [label=""]; - subgraph cluster_1 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X9e222efa6b726605_0 [label="Return\l"]; - } - subgraph cluster_2 { - label="core::num::::unchecked_mul"; - style="filled"; - color=lightgray; - Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_2 [label="0"]; - Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_1 [label="other"]; - Xeba6f5d5a379e29a_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xeba6f5d5a379e29a_1 -> Xeba6f5d5a379e29a_2 [label="_4"]; - Xeba6f5d5a379e29a_1 [label="Call\l"]; - Xeba6f5d5a379e29a_2 [label="Storage Dead _3\l_0 <- MulUnchecked(_1, _2)\lReturn\l"]; - } - Xeba6f5d5a379e29a_1 -> X9b97bece994ebb51_0 [label="_1,_2"]; - subgraph cluster_3 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X62f87ed0bcd6b426_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_4 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X69af4523a03742d5_0 -> X69af4523a03742d5_1 [label="_3"]; - X69af4523a03742d5_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X69af4523a03742d5_1 -> X69af4523a03742d5_2 [label="_2"]; - X69af4523a03742d5_1 [label="Storage Dead _4\lCall\l"]; - X69af4523a03742d5_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X69af4523a03742d5_0 -> Xcb8fb0027af607b6_0 [label="_4"]; - X69af4523a03742d5_1 -> X62f87ed0bcd6b426_0 [label="_3"]; - subgraph cluster_5 { - label="core::num::::unchecked_mul::prec\nondition_check"; - style="filled"; - color=lightgray; - X9b97bece994ebb51_0 -> X9b97bece994ebb51_2 [label="0"]; - X9b97bece994ebb51_0 -> X9b97bece994ebb51_1 [label="other"]; - X9b97bece994ebb51_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Mul(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - X9b97bece994ebb51_1 [label="Call\l"]; - X9b97bece994ebb51_2 [label="Return\l"]; - } - X9b97bece994ebb51_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X797ddd37b7ea3b5e_0 -> X797ddd37b7ea3b5e_1 [label="_5"]; - X797ddd37b7ea3b5e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X797ddd37b7ea3b5e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X797ddd37b7ea3b5e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_7 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - Xcb8fb0027af607b6_0 -> Xcb8fb0027af607b6_1 [label="_0"]; - Xcb8fb0027af607b6_0 [label="Call\l"]; - Xcb8fb0027af607b6_1 -> Xcb8fb0027af607b6_2 [label="_2"]; - Xcb8fb0027af607b6_1 [label="Call\l"]; - Xcb8fb0027af607b6_2 [label="Return\l"]; - } - Xcb8fb0027af607b6_0 -> X8f01db0e36395c71_0 [label="_1,const :: ()"]; - Xcb8fb0027af607b6_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_8 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X201617fc87c04742_0 -> X201617fc87c04742_1 [label="_0"]; - X201617fc87c04742_0 [label="Call\l"]; - X201617fc87c04742_1 [label="Return\l"]; - } - X201617fc87c04742_0 -> X86afcabc1ac42f91_0 [label="_1*,_2"]; - subgraph cluster_9 { - label="main"; - style="filled"; - color=palegreen; - Xe63d82c3b46f3acf_0 -> Xe63d82c3b46f3acf_1 [label="_3"]; - Xe63d82c3b46f3acf_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - Xe63d82c3b46f3acf_1 -> Xe63d82c3b46f3acf_2; - Xe63d82c3b46f3acf_1 [label="_6 <- chkd-Mul(_1, _2)\lAssert _6.1 == false\l"]; - Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_6 [label="0"]; - Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_3 [label="other"]; - Xe63d82c3b46f3acf_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; - Xe63d82c3b46f3acf_3 -> Xe63d82c3b46f3acf_4; - Xe63d82c3b46f3acf_3 [label="_9 <- chkd-Mul(_1, _2)\lAssert _9.1 == false\l"]; - Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_6 [label="0"]; - Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_5 [label="other"]; - Xe63d82c3b46f3acf_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; - Xe63d82c3b46f3acf_5 [label="Return\l"]; - Xe63d82c3b46f3acf_6 [label="Call\l"]; - } - Xe63d82c3b46f3acf_0 -> Xbe62f93610b866bf_0 [label="_1,_2"]; - Xe63d82c3b46f3acf_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_10 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_3 [label="Cleanup"]; - X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_1 [label="_0"]; - X86afcabc1ac42f91_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X86afcabc1ac42f91_1 -> X86afcabc1ac42f91_2; - X86afcabc1ac42f91_1 [label="Drop _1\l"]; - X86afcabc1ac42f91_2 [label="Return\l"]; - X86afcabc1ac42f91_3 -> X86afcabc1ac42f91_4; - X86afcabc1ac42f91_3 [label="Drop _1\l"]; - X86afcabc1ac42f91_4 [label="Resume\l"]; - } - X86afcabc1ac42f91_0 -> X69af4523a03742d5_0 [label="_3,_2"]; - subgraph cluster_11 { - label="unchecked_op"; - style="filled"; - color=palegreen; - Xbe62f93610b866bf_0 -> Xbe62f93610b866bf_1 [label="_0"]; - Xbe62f93610b866bf_0 [label="Call\l"]; - Xbe62f93610b866bf_1 [label="Return\l"]; - } - Xbe62f93610b866bf_0 -> Xeba6f5d5a379e29a_0 [label="_1,_2"]; -} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json deleted file mode 100644 index 854f39e8c..000000000 --- a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json +++ /dev/null @@ -1,2969 +0,0 @@ -{ - "name": "unchecked_mul", - "crate_id": 5290701492876642493, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 40, - 97, - 32, - 42, - 32, - 98, - 32, - 62, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 65, - 88, - 41, - 32, - 38, - 38, - 32, - 40, - 97, - 32, - 42, - 32, - 98, - 32, - 60, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 73, - 78, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 109, - 117, - 108, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 24, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE" - } - ], - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN13unchecked_mul4main17h0cc64cae78556d0bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 13 - } - } - } - } - ] - }, - "span": 78 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 213, - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 79 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 76, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 12 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 80 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Constant": { - "span": 82, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255, - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 15 - } - } - } - ] - } - ] - }, - "span": 81 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 3 - } - } - }, - "span": 81 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 83 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 83 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - ] - } - ] - }, - "span": 84 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 5 - } - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 87, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 58, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 18 - } - } - } - ], - "destination": { - "local": 10, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 87 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 89, - "mutability": "Not" - }, - { - "ty": 23, - "span": 90, - "mutability": "Not" - }, - { - "ty": 23, - "span": 91, - "mutability": "Not" - }, - { - "ty": 21, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 87, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 90, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 91, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 92 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - }, - { - "ty": 31, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 93, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 96, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 97, - "mutability": "Not" - }, - { - "ty": 23, - "span": 98, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 97, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 98, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 99, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 100 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 11 - } - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": "Return", - "span": 71 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 74, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 74, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 75 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_mul", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "MulUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 23, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 70 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hfdc6fe355496207dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_mul::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 62, - "mutability": "Not" - }, - { - "ty": 23, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - } - ], - "types": [ - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k deleted file mode 100644 index 5e13f0298..000000000 --- a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_neg() }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot deleted file mode 100644 index f0e5d18e2..000000000 --- a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot +++ /dev/null @@ -1,137 +0,0 @@ -digraph { - label="unchecked_neg"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8fc2060ad58510d8_0 [label="Intr: \ncold_path", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label="core::num::::unchecked_neg::prec\nondition_check"; - style="filled"; - color=lightgray; - X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_3 [label="0"]; - X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_1 [label="other"]; - X4dfedea7d15dfae0_0 [label="Storage Live _3\l_3 <- Eq(_1, const :: i16)\lSwitchInt _3\l"]; - X4dfedea7d15dfae0_1 -> X4dfedea7d15dfae0_2 [label="_4"]; - X4dfedea7d15dfae0_1 [label="Call\l"]; - X4dfedea7d15dfae0_2 [label="Storage Dead _3\lCall\l"]; - X4dfedea7d15dfae0_3 [label="Storage Dead _3\lReturn\l"]; - } - X4dfedea7d15dfae0_1 -> X8fc2060ad58510d8_0 [label=""]; - X4dfedea7d15dfae0_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_1 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xc472594511031ccd_0 [label="Return\l"]; - } - subgraph cluster_2 { - label="main"; - style="filled"; - color=palegreen; - X83ac00eefa6b73fd_0 -> X83ac00eefa6b73fd_1 [label="_1"]; - X83ac00eefa6b73fd_0 [label="_2 <- Use(const :: i16)\lCall\l"]; - X83ac00eefa6b73fd_1 [label="Return\l"]; - } - X83ac00eefa6b73fd_0 -> X25395281e54f77f2_0 [label="_2"]; - subgraph cluster_3 { - label="std::intrinsics::cold_pat\nh"; - style="filled"; - color=lightgray; - X3664cff3ef814fcc_0 [label="Return\l"]; - } - subgraph cluster_4 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X1e8170c41331abcf_0 -> X1e8170c41331abcf_1 [label="_3"]; - X1e8170c41331abcf_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X1e8170c41331abcf_1 -> X1e8170c41331abcf_2 [label="_2"]; - X1e8170c41331abcf_1 [label="Storage Dead _4\lCall\l"]; - X1e8170c41331abcf_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X1e8170c41331abcf_0 -> Xfd6302c9a18672af_0 [label="_4"]; - X1e8170c41331abcf_1 -> Xd2fa5dcfbfecedff_0 [label="_3"]; - subgraph cluster_5 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - Xfd6302c9a18672af_0 -> Xfd6302c9a18672af_1 [label="_0"]; - Xfd6302c9a18672af_0 [label="Call\l"]; - Xfd6302c9a18672af_1 -> Xfd6302c9a18672af_2 [label="_2"]; - Xfd6302c9a18672af_1 [label="Call\l"]; - Xfd6302c9a18672af_2 [label="Return\l"]; - } - Xfd6302c9a18672af_0 -> Xab2b2ee52cc1a3b6_0 [label="_1,const :: ()"]; - Xfd6302c9a18672af_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_6 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X25395281e54f77f2_0 -> X25395281e54f77f2_1 [label="_0"]; - X25395281e54f77f2_0 [label="Call\l"]; - X25395281e54f77f2_1 [label="Return\l"]; - } - X25395281e54f77f2_0 -> X36f7f4bce11fe0f_0 [label="_1"]; - subgraph cluster_7 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xd2fa5dcfbfecedff_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_8 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_1 [label="_0"]; - Xab2b2ee52cc1a3b6_0 [label="Call\l"]; - Xab2b2ee52cc1a3b6_1 [label="Return\l"]; - } - Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_0: _1 [label=""]; - subgraph cluster_9 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xa028f493aff12071_0 -> Xa028f493aff12071_1 [label="_0"]; - Xa028f493aff12071_0 [label="Call\l"]; - Xa028f493aff12071_1 [label="Return\l"]; - } - Xa028f493aff12071_0 -> X39f0dcc2beb3cbfc_0 [label="_1*,_2"]; - subgraph cluster_10 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_3 [label="Cleanup"]; - X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_1 [label="_0"]; - X39f0dcc2beb3cbfc_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X39f0dcc2beb3cbfc_1 -> X39f0dcc2beb3cbfc_2; - X39f0dcc2beb3cbfc_1 [label="Drop _1\l"]; - X39f0dcc2beb3cbfc_2 [label="Return\l"]; - X39f0dcc2beb3cbfc_3 -> X39f0dcc2beb3cbfc_4; - X39f0dcc2beb3cbfc_3 [label="Drop _1\l"]; - X39f0dcc2beb3cbfc_4 [label="Resume\l"]; - } - X39f0dcc2beb3cbfc_0 -> X1e8170c41331abcf_0 [label="_3,_2"]; - subgraph cluster_11 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X1752551397e242d3_0 -> X1752551397e242d3_1 [label="_5"]; - X1752551397e242d3_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X1752551397e242d3_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X1752551397e242d3_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_12 { - label="core::num::::unchecked_neg"; - style="filled"; - color=lightgray; - X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_2 [label="0"]; - X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_1 [label="other"]; - X36f7f4bce11fe0f_0 [label="Storage Live _2\l_2 <- UbChecks :: bool\lSwitchInt _2\l"]; - X36f7f4bce11fe0f_1 -> X36f7f4bce11fe0f_2 [label="_3"]; - X36f7f4bce11fe0f_1 [label="Call\l"]; - X36f7f4bce11fe0f_2 [label="Storage Dead _2\l_0 <- SubUnchecked(const :: i16, _1)\lReturn\l"]; - } - X36f7f4bce11fe0f_1 -> X4dfedea7d15dfae0_0 [label="_1"]; -} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json deleted file mode 100644 index a97297a9a..000000000 --- a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json +++ /dev/null @@ -1,2339 +0,0 @@ -{ - "name": "unchecked_neg", - "crate_id": 8515610171801290459, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 110, - 101, - 103, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E" - } - ], - [ - 25, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE" - } - ], - [ - 24, - { - "IntrinsicSym": "cold_path" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_neg", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 46 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 47 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 46 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 48, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 49 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 2 - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "SubUnchecked", - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 7 - } - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": "Return", - "span": 50 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 55, - "mutability": "Not" - }, - { - "ty": 21, - "span": 46, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 49, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 55, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 56 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 14 - } - } - } - } - ] - }, - "span": 75 - } - ], - "terminator": { - "kind": "Return", - "span": 74 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 77, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 78 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_neg4main17h279e62d4b439df5fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 9, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 81, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - } - ] - }, - "span": 82 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 15 - } - } - }, - "args": [ - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 83 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 85, - "mutability": "Not" - }, - { - "ty": 23, - "span": 82, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 86, - "scope": 1 - }, - "composite": null, - "value": { - "Const": { - "span": 81, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 85, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 87 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 13 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 72 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 72, - "mutability": "Not" - }, - { - "ty": 1, - "span": 72, - "mutability": "Not" - }, - { - "ty": 31, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 72 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_neg::precondition_check", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 58 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 59, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 8 - } - } - } - ] - } - ] - }, - "span": 58 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 1 - } - } - }, - "span": 57 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 9 - } - } - }, - "args": [], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 61 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 65 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 62, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 10 - } - } - }, - "args": [ - { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 64 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 65 - } - ], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 67, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 68, - "mutability": "Not" - }, - { - "ty": 27, - "span": 64, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 68, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 69, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 70, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 71 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 12 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 72 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 72, - "mutability": "Not" - }, - { - "ty": 1, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 72 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 72 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 72, - "mutability": "Not" - }, - { - "ty": 1, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 72 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 10, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 88, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 89 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 90 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 91, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 92, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 92, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 93, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 94 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::intrinsics::cold_path", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 45 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 73 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 73, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 73 - } - } - }, - "details": null - } - ], - "types": [ - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k deleted file mode 100644 index 6716fe2fb..000000000 --- a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k +++ /dev/null @@ -1,71 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 79 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 15 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 71 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 13 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_shl(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot deleted file mode 100644 index b621a4e00..000000000 --- a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot +++ /dev/null @@ -1,127 +0,0 @@ -digraph { - label="unchecked_shl"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - subgraph cluster_0 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X7ca0ff879d4d13eb_0 -> X7ca0ff879d4d13eb_1 [label="_0"]; - X7ca0ff879d4d13eb_0 [label="Call\l"]; - X7ca0ff879d4d13eb_1 [label="Return\l"]; - } - X7ca0ff879d4d13eb_0 -> Xf64250b1070257e5_0 [label="_1*,_2"]; - subgraph cluster_1 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_1 [label="_0"]; - Xca73baf8b721e82c_0 [label="Call\l"]; - Xca73baf8b721e82c_1 [label="Return\l"]; - } - Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_0: _1 [label=""]; - subgraph cluster_2 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X6985b604fd3ae6be_0 -> X6985b604fd3ae6be_1 [label="_0"]; - X6985b604fd3ae6be_0 [label="Call\l"]; - X6985b604fd3ae6be_1 [label="Return\l"]; - } - X6985b604fd3ae6be_0 -> Xe1c01b35d6c2026f_0 [label="_1,_2"]; - subgraph cluster_3 { - label="core::num::::unchecked_shl"; - style="filled"; - color=lightgray; - Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_2 [label="0"]; - Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_1 [label="other"]; - Xe1c01b35d6c2026f_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xe1c01b35d6c2026f_1 -> Xe1c01b35d6c2026f_2 [label="_4"]; - Xe1c01b35d6c2026f_1 [label="Call\l"]; - Xe1c01b35d6c2026f_2 [label="Storage Dead _3\l_0 <- ShlUnchecked(_1, _2)\lReturn\l"]; - } - Xe1c01b35d6c2026f_1 -> X739610367822bd9b_0 [label="_2"]; - subgraph cluster_4 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xf64250b1070257e5_0 -> Xf64250b1070257e5_3 [label="Cleanup"]; - Xf64250b1070257e5_0 -> Xf64250b1070257e5_1 [label="_0"]; - Xf64250b1070257e5_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xf64250b1070257e5_1 -> Xf64250b1070257e5_2; - Xf64250b1070257e5_1 [label="Drop _1\l"]; - Xf64250b1070257e5_2 [label="Return\l"]; - Xf64250b1070257e5_3 -> Xf64250b1070257e5_4; - Xf64250b1070257e5_3 [label="Drop _1\l"]; - Xf64250b1070257e5_4 [label="Resume\l"]; - } - Xf64250b1070257e5_0 -> X8c1d75f364744448_0 [label="_3,_2"]; - subgraph cluster_5 { - label="core::num::::unchecked_shl::prec\nondition_check"; - style="filled"; - color=lightgray; - X739610367822bd9b_0 -> X739610367822bd9b_2 [label="0"]; - X739610367822bd9b_0 -> X739610367822bd9b_1 [label="other"]; - X739610367822bd9b_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; - X739610367822bd9b_1 [label="Storage Dead _2\lReturn\l"]; - X739610367822bd9b_2 [label="Call\l"]; - } - X739610367822bd9b_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X8c1d75f364744448_0 -> X8c1d75f364744448_1 [label="_3"]; - X8c1d75f364744448_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X8c1d75f364744448_1 -> X8c1d75f364744448_2 [label="_2"]; - X8c1d75f364744448_1 [label="Storage Dead _4\lCall\l"]; - X8c1d75f364744448_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X8c1d75f364744448_0 -> X92deb757c4463693_0 [label="_4"]; - X8c1d75f364744448_1 -> X9e057dae70d0b216_0 [label="_3"]; - subgraph cluster_7 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xebd6923e157bf244_0 [label="Return\l"]; - } - subgraph cluster_8 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - Xd9564944a8357ebc_0 -> Xd9564944a8357ebc_1 [label="_5"]; - Xd9564944a8357ebc_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - Xd9564944a8357ebc_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - Xd9564944a8357ebc_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_9 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X92deb757c4463693_0 -> X92deb757c4463693_1 [label="_0"]; - X92deb757c4463693_0 [label="Call\l"]; - X92deb757c4463693_1 -> X92deb757c4463693_2 [label="_2"]; - X92deb757c4463693_1 [label="Call\l"]; - X92deb757c4463693_2 [label="Return\l"]; - } - X92deb757c4463693_0 -> Xca73baf8b721e82c_0 [label="_1,const :: ()"]; - X92deb757c4463693_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_10 { - label="main"; - style="filled"; - color=palegreen; - Xb244b26227a3c207_0 -> Xb244b26227a3c207_1 [label="_1"]; - Xb244b26227a3c207_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; - Xb244b26227a3c207_1 [label="Return\l"]; - } - Xb244b26227a3c207_0 -> X6985b604fd3ae6be_0 [label="_2,_3"]; - subgraph cluster_11 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X9e057dae70d0b216_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } -} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json deleted file mode 100644 index 304a8ec60..000000000 --- a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json +++ /dev/null @@ -1,2353 +0,0 @@ -{ - "name": "unchecked_shl", - "crate_id": 2438242285894030786, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 104, - 108, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 25, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h4b70c8118c54af25E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 83, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 16 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 85 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 86, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 87, - "mutability": "Not" - }, - { - "ty": 24, - "span": 88, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 87, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 88, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 90 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 11 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - }, - { - "ty": 31, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shl::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 16, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 7 - } - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 2 - }, - "span": 57 - } - ], - "terminator": { - "kind": "Return", - "span": 56 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 8 - } - } - }, - "args": [ - { - "Constant": { - "span": 59, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 9 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 60 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 62, - "mutability": "Not" - }, - { - "ty": 21, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 60, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "rhs", - "source_info": { - "span": 62, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 63 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 65, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 65 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 67, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 12 - } - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 69, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_shl4main17h99915c6a84d89e82E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - } - } - ] - }, - "span": 76 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 71, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } - }, - "args": [ - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 77 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 78, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 79, - "mutability": "Not" - }, - { - "ty": 23, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 76, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 1 - }, - "composite": null, - "value": { - "Const": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 79, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 82 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shl", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "ShlUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 24, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - } - ], - "types": [ - [ - 24, - { - "RigidTy": { - "Uint": "U32" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k deleted file mode 100644 index 88c672c3c..000000000 --- a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 71 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 13 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_shr(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot deleted file mode 100644 index 4bfe94015..000000000 --- a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot +++ /dev/null @@ -1,127 +0,0 @@ -digraph { - label="unchecked_shr"; - node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - subgraph cluster_0 { - label="core::num::::unchecked_shr"; - style="filled"; - color=lightgray; - X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_2 [label="0"]; - X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_1 [label="other"]; - X3dfb10421593b1e8_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - X3dfb10421593b1e8_1 -> X3dfb10421593b1e8_2 [label="_4"]; - X3dfb10421593b1e8_1 [label="Call\l"]; - X3dfb10421593b1e8_2 [label="Storage Dead _3\l_0 <- ShrUnchecked(_1, _2)\lReturn\l"]; - } - X3dfb10421593b1e8_1 -> X67406d0b881e84da_0 [label="_2"]; - subgraph cluster_1 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X1fcbbfbc6742d998_0 -> X1fcbbfbc6742d998_1 [label="_5"]; - X1fcbbfbc6742d998_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X1fcbbfbc6742d998_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X1fcbbfbc6742d998_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_2 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X2ea79ec23c0f6969_0 -> X2ea79ec23c0f6969_1 [label="_0"]; - X2ea79ec23c0f6969_0 [label="Call\l"]; - X2ea79ec23c0f6969_1 [label="Return\l"]; - } - X2ea79ec23c0f6969_0 -> X3dfb10421593b1e8_0 [label="_1,_2"]; - subgraph cluster_3 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X308478c52589b452_0 -> X308478c52589b452_1 [label="_0"]; - X308478c52589b452_0 [label="Call\l"]; - X308478c52589b452_1 [label="Return\l"]; - } - X308478c52589b452_0 -> X308478c52589b452_0: _1 [label=""]; - subgraph cluster_4 { - label="main"; - style="filled"; - color=palegreen; - X74e505ee082dcd3c_0 -> X74e505ee082dcd3c_1 [label="_1"]; - X74e505ee082dcd3c_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; - X74e505ee082dcd3c_1 [label="Return\l"]; - } - X74e505ee082dcd3c_0 -> X2ea79ec23c0f6969_0 [label="_2,_3"]; - subgraph cluster_5 { - label="core::num::::unchecked_shr::prec\nondition_check"; - style="filled"; - color=lightgray; - X67406d0b881e84da_0 -> X67406d0b881e84da_2 [label="0"]; - X67406d0b881e84da_0 -> X67406d0b881e84da_1 [label="other"]; - X67406d0b881e84da_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; - X67406d0b881e84da_1 [label="Storage Dead _2\lReturn\l"]; - X67406d0b881e84da_2 [label="Call\l"]; - } - X67406d0b881e84da_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X63a912d85dcf5dbc_0 -> X63a912d85dcf5dbc_1 [label="_0"]; - X63a912d85dcf5dbc_0 [label="Call\l"]; - X63a912d85dcf5dbc_1 [label="Return\l"]; - } - X63a912d85dcf5dbc_0 -> Xc86fbb6bb8f835bf_0 [label="_1*,_2"]; - subgraph cluster_7 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X8f6613fb2e5e284f_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_8 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - Xc5c68a464c01d1d6_0 -> Xc5c68a464c01d1d6_1 [label="_3"]; - Xc5c68a464c01d1d6_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - Xc5c68a464c01d1d6_1 -> Xc5c68a464c01d1d6_2 [label="_2"]; - Xc5c68a464c01d1d6_1 [label="Storage Dead _4\lCall\l"]; - Xc5c68a464c01d1d6_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - Xc5c68a464c01d1d6_0 -> X418d756885456e9e_0 [label="_4"]; - Xc5c68a464c01d1d6_1 -> X8f6613fb2e5e284f_0 [label="_3"]; - subgraph cluster_9 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xa8d344f9e18404f4_0 [label="Return\l"]; - } - subgraph cluster_10 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X418d756885456e9e_0 -> X418d756885456e9e_1 [label="_0"]; - X418d756885456e9e_0 [label="Call\l"]; - X418d756885456e9e_1 -> X418d756885456e9e_2 [label="_2"]; - X418d756885456e9e_1 [label="Call\l"]; - X418d756885456e9e_2 [label="Return\l"]; - } - X418d756885456e9e_0 -> X308478c52589b452_0 [label="_1,const :: ()"]; - X418d756885456e9e_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_11 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_3 [label="Cleanup"]; - Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_1 [label="_0"]; - Xc86fbb6bb8f835bf_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xc86fbb6bb8f835bf_1 -> Xc86fbb6bb8f835bf_2; - Xc86fbb6bb8f835bf_1 [label="Drop _1\l"]; - Xc86fbb6bb8f835bf_2 [label="Return\l"]; - Xc86fbb6bb8f835bf_3 -> Xc86fbb6bb8f835bf_4; - Xc86fbb6bb8f835bf_3 [label="Drop _1\l"]; - Xc86fbb6bb8f835bf_4 [label="Resume\l"]; - } - Xc86fbb6bb8f835bf_0 -> Xc5c68a464c01d1d6_0 [label="_3,_2"]; -} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json deleted file mode 100644 index a18deb336..000000000 --- a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json +++ /dev/null @@ -1,2353 +0,0 @@ -{ - "name": "unchecked_shr", - "crate_id": 11374706484823853070, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 104, - 114, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E" - } - ], - [ - 25, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 83, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 16 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 85 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 86, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 87, - "mutability": "Not" - }, - { - "ty": 24, - "span": 88, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 87, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 88, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 90 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 65, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 65 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hd2b815e8bd96d253E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 11 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - }, - { - "ty": 31, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 67, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 12 - } - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 69, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - } - } - ] - }, - "span": 76 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 71, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } - }, - "args": [ - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 77 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 78, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 79, - "mutability": "Not" - }, - { - "ty": 23, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 76, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 1 - }, - "composite": null, - "value": { - "Const": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 79, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 82 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shr::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 16, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 7 - } - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 2 - }, - "span": 57 - } - ], - "terminator": { - "kind": "Return", - "span": 56 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 8 - } - } - }, - "args": [ - { - "Constant": { - "span": 59, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 9 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 60 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 62, - "mutability": "Not" - }, - { - "ty": 21, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 60, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "rhs", - "source_info": { - "span": 62, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 63 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shr", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "ShrUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 24, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - } - ], - "types": [ - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 24, - { - "RigidTy": { - "Uint": "U32" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k deleted file mode 100644 index 4730bf3a4..000000000 --- a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16::MAX) && (a - b < i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_sub(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot deleted file mode 100644 index 7dd70579e..000000000 --- a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_sub"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X6ed7f5222f8fff3d_0 -> X6ed7f5222f8fff3d_1 [label="_0"]; - X6ed7f5222f8fff3d_0 [label="Call\l"]; - X6ed7f5222f8fff3d_1 -> X6ed7f5222f8fff3d_2 [label="_2"]; - X6ed7f5222f8fff3d_1 [label="Call\l"]; - X6ed7f5222f8fff3d_2 [label="Return\l"]; - } - X6ed7f5222f8fff3d_0 -> X2c1ab9ccb2ee2902_0 [label="_1,const :: ()"]; - X6ed7f5222f8fff3d_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xb356150a39730498_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="core::num::::unchecked_sub"; - style="filled"; - color=lightgray; - Xe89ce436dda28930_0 -> Xe89ce436dda28930_2 [label="0"]; - Xe89ce436dda28930_0 -> Xe89ce436dda28930_1 [label="other"]; - Xe89ce436dda28930_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xe89ce436dda28930_1 -> Xe89ce436dda28930_2 [label="_4"]; - Xe89ce436dda28930_1 [label="Call\l"]; - Xe89ce436dda28930_2 [label="Storage Dead _3\l_0 <- SubUnchecked(_1, _2)\lReturn\l"]; - } - Xe89ce436dda28930_1 -> Xd6d8542b139753eb_0 [label="_1,_2"]; - subgraph cluster_3 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X4d9411a803faadfe_0 -> X4d9411a803faadfe_3 [label="Cleanup"]; - X4d9411a803faadfe_0 -> X4d9411a803faadfe_1 [label="_0"]; - X4d9411a803faadfe_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X4d9411a803faadfe_1 -> X4d9411a803faadfe_2; - X4d9411a803faadfe_1 [label="Drop _1\l"]; - X4d9411a803faadfe_2 [label="Return\l"]; - X4d9411a803faadfe_3 -> X4d9411a803faadfe_4; - X4d9411a803faadfe_3 [label="Drop _1\l"]; - X4d9411a803faadfe_4 [label="Resume\l"]; - } - X4d9411a803faadfe_0 -> X396121085053712_0 [label="_3,_2"]; - subgraph cluster_4 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_1 [label="_0"]; - X2c1ab9ccb2ee2902_0 [label="Call\l"]; - X2c1ab9ccb2ee2902_1 [label="Return\l"]; - } - X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_0: _1 [label=""]; - subgraph cluster_5 { - label="main"; - style="filled"; - color=palegreen; - X4f441ab82149a815_0 -> X4f441ab82149a815_1 [label="_3"]; - X4f441ab82149a815_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - X4f441ab82149a815_1 -> X4f441ab82149a815_2; - X4f441ab82149a815_1 [label="_6 <- chkd-Sub(_1, _2)\lAssert _6.1 == false\l"]; - X4f441ab82149a815_2 -> X4f441ab82149a815_6 [label="0"]; - X4f441ab82149a815_2 -> X4f441ab82149a815_3 [label="other"]; - X4f441ab82149a815_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; - X4f441ab82149a815_3 -> X4f441ab82149a815_4; - X4f441ab82149a815_3 [label="_9 <- chkd-Sub(_1, _2)\lAssert _9.1 == false\l"]; - X4f441ab82149a815_4 -> X4f441ab82149a815_6 [label="0"]; - X4f441ab82149a815_4 -> X4f441ab82149a815_5 [label="other"]; - X4f441ab82149a815_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; - X4f441ab82149a815_5 [label="Return\l"]; - X4f441ab82149a815_6 [label="Call\l"]; - } - X4f441ab82149a815_0 -> X949dd9980f2a3388_0 [label="_1,_2"]; - X4f441ab82149a815_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_6 { - label="core::num::::unchecked_sub::prec\nondition_check"; - style="filled"; - color=lightgray; - Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_2 [label="0"]; - Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_1 [label="other"]; - Xd6d8542b139753eb_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Sub(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - Xd6d8542b139753eb_1 [label="Call\l"]; - Xd6d8542b139753eb_2 [label="Return\l"]; - } - Xd6d8542b139753eb_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_7 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X396121085053712_0 -> X396121085053712_1 [label="_3"]; - X396121085053712_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X396121085053712_1 -> X396121085053712_2 [label="_2"]; - X396121085053712_1 [label="Storage Dead _4\lCall\l"]; - X396121085053712_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X396121085053712_0 -> X6ed7f5222f8fff3d_0 [label="_4"]; - X396121085053712_1 -> Xb356150a39730498_0 [label="_3"]; - subgraph cluster_8 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X3d6480ec228be4ec_0 -> X3d6480ec228be4ec_1 [label="_5"]; - X3d6480ec228be4ec_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X3d6480ec228be4ec_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X3d6480ec228be4ec_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_9 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X949dd9980f2a3388_0 -> X949dd9980f2a3388_1 [label="_0"]; - X949dd9980f2a3388_0 [label="Call\l"]; - X949dd9980f2a3388_1 [label="Return\l"]; - } - X949dd9980f2a3388_0 -> Xe89ce436dda28930_0 [label="_1,_2"]; - subgraph cluster_10 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X7cb88635fb24da5a_0 [label="Return\l"]; - } - subgraph cluster_11 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X41331acabe05b18d_0 -> X41331acabe05b18d_1 [label="_0"]; - X41331acabe05b18d_0 [label="Call\l"]; - X41331acabe05b18d_1 [label="Return\l"]; - } - X41331acabe05b18d_0 -> X4d9411a803faadfe_0 [label="_1*,_2"]; -} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json deleted file mode 100644 index 9559219eb..000000000 --- a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json +++ /dev/null @@ -1,2969 +0,0 @@ -{ - "name": "unchecked_sub", - "crate_id": 17961444647620661476, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 40, - 97, - 32, - 45, - 32, - 98, - 32, - 62, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 65, - 88, - 41, - 32, - 38, - 38, - 32, - 40, - 97, - 32, - 45, - 32, - 98, - 32, - 60, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 73, - 78, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 117, - 98, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE" - } - ], - [ - 24, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_sub4main17h289393681834f0fcE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 13 - } - } - } - } - ] - }, - "span": 78 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 213, - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 79 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 76, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 12 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 80 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Constant": { - "span": 82, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255, - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 15 - } - } - } - ] - } - ] - }, - "span": 81 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 3 - } - } - }, - "span": 81 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 83 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 83 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - ] - } - ] - }, - "span": 84 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 5 - } - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 87, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 58, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 18 - } - } - } - ], - "destination": { - "local": 10, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 87 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 89, - "mutability": "Not" - }, - { - "ty": 23, - "span": 90, - "mutability": "Not" - }, - { - "ty": 23, - "span": 91, - "mutability": "Not" - }, - { - "ty": 21, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 87, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 90, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 91, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 92 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 62, - "mutability": "Not" - }, - { - "ty": 23, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - }, - { - "ty": 31, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 11 - } - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": "Return", - "span": 71 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 74, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 74, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 75 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 70 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h233dfbd9029fc4f7E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "SubUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 23, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 93, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 96, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 97, - "mutability": "Not" - }, - { - "ty": 23, - "span": 98, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 97, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 98, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_sum", - "source_info": { - "span": 99, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 100 - } - } - }, - "details": null - } - ], - "types": [ - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ] - ], - "debug": null -} From d0eb84955e242f47250e09c876f20cea6dccd0e5 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 13:47:04 -0600 Subject: [PATCH 31/84] Removing nix produced link --- result | 1 - 1 file changed, 1 deletion(-) delete mode 120000 result diff --git a/result b/result deleted file mode 120000 index 84a0bb600..000000000 --- a/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/7p32kchz5c5ssnmy6s32nylx3adwi86i-python3.10-kmir-0.3.111 \ No newline at end of file From 3f28089d5cb7cdd4d9eb8469e779943c28e3f243 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 13:47:49 -0600 Subject: [PATCH 32/84] dropping changes to Makefile --- Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 633b9c896..12374d9d6 100644 --- a/Makefile +++ b/Makefile @@ -45,9 +45,6 @@ smir-parse-tests: # build # commented out for CI's sake poetry-install: $(POETRY) install -lock: - $(POETRY) lock - test-unit: poetry-install # build # commented out for CI's sake $(POETRY_RUN) pytest $(TOP_DIR)/kmir/src/tests/unit --maxfail=1 --verbose $(TEST_ARGS) @@ -55,12 +52,6 @@ test-integration: build $(POETRY_RUN) pytest $(TOP_DIR)/kmir/src/tests/integration --maxfail=1 --verbose \ --durations=0 --numprocesses=4 --dist=worksteal $(TEST_ARGS) -install: poetry-install - $(POETRY_RUN) pip install --user . - -dist: poetry-install - cd kmir && poetry build - # Checks and formatting format: autoflake isort black @@ -112,7 +103,7 @@ cov-integration: test-integration .PHONY: clean clean: - rm -rf kmir/dist kmir/.coverage kmir/cov-* kmir/.mypy_cache kmir/.pytest_cache kmir/src/kmir/kdist/kdist-* + rm -rf kmir/dist kmir/.coverage kmir/cov-* kmir/.mypy_cache kmir/.pytest_cache find kmir/ -type d -name __pycache__ -prune -exec rm -rf {} \; pyupgrade: SRC_FILES := $(shell find kmir/src -type f -name '*.py') From 41ca00748ada1e55db41a4561f6120f036b408e7 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 13:49:10 -0600 Subject: [PATCH 33/84] Drop changes to package and revert to master, will update again with CI WF --- kmir/src/kmir/kdist/__init__.py | 1 - kmir/src/kmir/kdist/plugin.py | 13 +++++-------- package/version | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/kmir/src/kmir/kdist/__init__.py b/kmir/src/kmir/kdist/__init__.py index 8b1378917..e69de29bb 100644 --- a/kmir/src/kmir/kdist/__init__.py +++ b/kmir/src/kmir/kdist/__init__.py @@ -1 +0,0 @@ - diff --git a/kmir/src/kmir/kdist/plugin.py b/kmir/src/kmir/kdist/plugin.py index 67efc4eec..c2d2f6f43 100644 --- a/kmir/src/kmir/kdist/plugin.py +++ b/kmir/src/kmir/kdist/plugin.py @@ -11,11 +11,11 @@ from collections.abc import Callable, Mapping from typing import Any, Final + class SourceTarget(Target): SRC_DIR: Final = Path(__file__).parent def build(self, output_dir: Path, deps: dict[str, Path], args: dict[str, Any], verbose: bool) -> None: - # Just copy to output_dir shutil.copytree(self.SRC_DIR / 'mir-semantics', output_dir / 'mir-semantics') def source(self) -> tuple[Path, ...]: @@ -24,6 +24,7 @@ def source(self) -> tuple[Path, ...]: def deps(self) -> tuple[()]: return () + class KompileTarget(Target): _kompile_args: Callable[[Path], Mapping[str, Any]] @@ -32,16 +33,12 @@ def __init__(self, kompile_args: Callable[[Path], Mapping[str, Any]]): def build(self, output_dir: Path, deps: dict[str, Path], args: dict[str, Any], verbose: bool) -> None: kompile_args = self._kompile_args(deps['mir-semantics.source']) - # Use the installed directory for output - kompile(output_dir=self.KDIST_DIR, verbose=verbose, **kompile_args) - # Copy to output_dir if needed for immediate use - if output_dir.exists(): - shutil.rmtree(output_dir) - shutil.copytree(self.KDIST_DIR, output_dir) + kompile(output_dir=output_dir, verbose=verbose, **kompile_args) def deps(self) -> tuple[str, ...]: return ('mir-semantics.source',) + def _default_args(src_dir: Path) -> dict[str, Any]: return { 'include_dirs': [src_dir], @@ -50,6 +47,7 @@ def _default_args(src_dir: Path) -> dict[str, Any]: 'syntax_module': 'KMIR-SYNTAX', } + __TARGETS__: Final = { 'source': SourceTarget(), 'llvm': KompileTarget( @@ -75,4 +73,3 @@ def _default_args(src_dir: Path) -> dict[str, Any]: }, ), } - diff --git a/package/version b/package/version index 766a4566d..7b32a6e29 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.111 +0.3.109 From f2f0a9d4d076c2533335c61132da02ca6cf92883 Mon Sep 17 00:00:00 2001 From: devops Date: Mon, 31 Mar 2025 19:50:22 +0000 Subject: [PATCH 34/84] Set Version: 0.3.112 --- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- package/version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index e8c90498b..6996c78ba 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.111" +version = "0.3.112" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index 91f6ba837..1b91a4cff 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.111' +VERSION: Final = '0.3.112' diff --git a/package/version b/package/version index 766a4566d..705bcb8b4 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.111 +0.3.112 From a4227c45bcf182e0cfc230dff0620efeabfe5d53 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 15:19:43 -0600 Subject: [PATCH 35/84] Build test image and run a test against that image --- .github/workflows/container-test.yml | 33 ++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 2aa88673f..5dd1a1062 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -1,22 +1,47 @@ -name: Test Built Container +name: Example Test w/ Published Container on: pull_request: branches: - master +permissions: + packages: write jobs: + publish-test-container: + runs-on: ubuntu-latest + outputs: + container-image: ${{ steps.set-container-name .outputs.container-image }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3.10.0 + - name: Set K_VERSION + run: | + export K_VERSION=$(cat deps/k_release) + - name: Set Container Name + id: set-container-name + run: | + echo "container-name=ghcr.io/runtimeverification/mir-semantics/kmir:ubuntu-jammy-${K_VERSION}" >> $GITHUB_OUTPUT + - name: Build Kmir Container + id: build-container + run: | + docker buildx build -f Dockerfile.kmir --platform linux/amd64 -t ${{ steps.set-container-name.outputs.container-name }} --push . + test: runs-on: ubuntu-latest + needs: publish-test-container container: - image: ghcr.io/runtimeverification/mir-semantics/kmir:ubuntu-jammy-7.1.229 + image: ${{ needs.publish-test-container.outputs.container-image }} steps: - name: Checkout code uses: actions/checkout@v4 with: submodules: recursive - ref: sample-challenge-11-proofs - + ref: sample-challenge-11-proofs - name: Kmir Prove run: | cd rust-verification-proofs/unchecked_add From 658de069c3b72d289fa3aec5da1eaeb1a264b528 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 15:21:37 -0600 Subject: [PATCH 36/84] Set K_VERSION in image build --- .github/workflows/container-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 5dd1a1062..f09269149 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -29,7 +29,7 @@ jobs: - name: Build Kmir Container id: build-container run: | - docker buildx build -f Dockerfile.kmir --platform linux/amd64 -t ${{ steps.set-container-name.outputs.container-name }} --push . + docker buildx build --build-arg K_VERSION=${K_VERSION} -f Dockerfile.kmir --platform linux/amd64 -t ${{ steps.set-container-name.outputs.container-name }} --push . test: runs-on: ubuntu-latest From 151e72f9100e97903a83d0607bc069c679497a54 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 15:34:49 -0600 Subject: [PATCH 37/84] Rework naming of image and setting variables for reference. Tag name is long but describes OS-kmirVersion_KVersion-shaGenerated --- .github/workflows/container-test.yml | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index f09269149..6e046e475 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -8,10 +8,13 @@ permissions: packages: write jobs: - publish-test-container: + publish-test-image: runs-on: ubuntu-latest outputs: - container-image: ${{ steps.set-container-name .outputs.container-image }} + container-image: ${{ steps.set-image-name .outputs.container-image }} + k-version: ${{ steps.set-image-name .outputs.k-version }} + kmir-version: ${{ steps.set-image-name .outputs.kmir-version }} + short-sha: ${{ steps.set-image-name .outputs.short-sha }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -23,26 +26,33 @@ jobs: run: | export K_VERSION=$(cat deps/k_release) - name: Set Container Name - id: set-container-name + id: set-image-name run: | - echo "container-name=ghcr.io/runtimeverification/mir-semantics/kmir:ubuntu-jammy-${K_VERSION}" >> $GITHUB_OUTPUT + echo "image-name=ghcr.io/runtimeverification/mir-semantics/kmir" >> $GITHUB_OUTPUT + echo "k-version=${K_VERSION}" >> $GITHUB_OUTPUT + echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT + echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Build Kmir Container - id: build-container - run: | - docker buildx build --build-arg K_VERSION=${K_VERSION} -f Dockerfile.kmir --platform linux/amd64 -t ${{ steps.set-container-name.outputs.container-name }} --push . + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile.kmir + platforms: linux/amd64 + push: true + tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} test: runs-on: ubuntu-latest - needs: publish-test-container + needs: publish-test-image container: - image: ${{ needs.publish-test-container.outputs.container-image }} + image: ${{ needs.publish-test-image.outputs.image-name }} steps: - name: Checkout code uses: actions/checkout@v4 with: submodules: recursive ref: sample-challenge-11-proofs - - name: Kmir Prove + - name: kmir Prove run: | cd rust-verification-proofs/unchecked_add kmir prove run $PWD/unchecked-op-spec.k --proof-dir $PWD/proof From 6bb256606b7d923342daee905d28b16327e75c24 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 15:55:26 -0600 Subject: [PATCH 38/84] Updating kmir release and test workflow --- .github/workflows/container-test.yml | 13 +++++++++---- .github/workflows/release.yml | 26 +++++++++++++++----------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 6e046e475..a9f59ed15 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -20,12 +20,15 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + - name: Docker ghcr.io Login + uses: docker/login-action@v3.4.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3.10.0 - - name: Set K_VERSION - run: | - export K_VERSION=$(cat deps/k_release) - - name: Set Container Name + - name: Set Image Name Parameters id: set-image-name run: | echo "image-name=ghcr.io/runtimeverification/mir-semantics/kmir" >> $GITHUB_OUTPUT @@ -39,6 +42,8 @@ jobs: file: Dockerfile.kmir platforms: linux/amd64 push: true + build-args: | + K_VERSION=${{ steps.set-image-name.outputs.k-version }} tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a509cfc93..b2f2d898c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,17 +19,21 @@ jobs: - name: 'Login to Docker Hub' uses: docker/login-action@v3.4.0 with: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set K_VERSION - id: k_version + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Set Image Name + id: set-image-name run: | - echo "K_VERSION=${{ github.sha }}" >> $GITHUB_OUTPUT - - - name: Build and push + echo "image-name=runtimeverificationinc/kmir" >> $GITHUB_OUTPUT + echo "k-version=${K_VERSION}" >> $GITHUB_OUTPUT + echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT + echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Build Kmir Container uses: docker/build-push-action@v6 with: - push: false - tags: ghcr.io/runtimeverification/mir-semantics/kmir:ubuntu-jammy-${{ steps.k_version.outputs.K_VERSION }} - \ No newline at end of file + context: . + file: Dockerfile.kmir + platforms: linux/amd64 + push: true + tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }} + \ No newline at end of file From f1a25dfcef75d58257ba060c721ff50e318420f5 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 15:59:24 -0600 Subject: [PATCH 39/84] Missed setting K_VERSION after removal of step --- .github/workflows/container-test.yml | 2 +- .github/workflows/release.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index a9f59ed15..0270eef97 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -32,7 +32,7 @@ jobs: id: set-image-name run: | echo "image-name=ghcr.io/runtimeverification/mir-semantics/kmir" >> $GITHUB_OUTPUT - echo "k-version=${K_VERSION}" >> $GITHUB_OUTPUT + echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Build Kmir Container diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2f2d898c..d8b6f9282 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} + - name: Set Image Name id: set-image-name run: | From 912ac88baad14cfb74f682bf8d128f1adc8d1861 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 16:42:44 -0600 Subject: [PATCH 40/84] Login to ghcr.io using classic token, GH token not supported --- .github/workflows/container-test.yml | 4 ++-- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 0270eef97..ef49e7db1 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -24,8 +24,8 @@ jobs: uses: docker/login-action@v3.4.0 with: registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + username: rv-jenkins + password: ${{ secrets.JENKINS_GITHUB_PAT }} - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3.10.0 - name: Set Image Name Parameters diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8b6f9282..1b8ae2b43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: 'Login to Docker Hub' uses: docker/login-action@v3.4.0 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} + username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Set Image Name From 1358bacfbffed26770976e83f16ccd79d794389b Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 16:51:50 -0600 Subject: [PATCH 41/84] Just need to set permissions in Packages? --- .github/workflows/container-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index ef49e7db1..0270eef97 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -24,8 +24,8 @@ jobs: uses: docker/login-action@v3.4.0 with: registry: ghcr.io - username: rv-jenkins - password: ${{ secrets.JENKINS_GITHUB_PAT }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3.10.0 - name: Set Image Name Parameters From 18ef7ca7ae35f0b4a74c07c8e150c13bfa1d0679 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 17:04:15 -0600 Subject: [PATCH 42/84] Use publish image --- .github/workflows/container-test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 0270eef97..002f901d3 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -49,8 +49,13 @@ jobs: test: runs-on: ubuntu-latest needs: publish-test-image + permissions: + packages: read container: - image: ${{ needs.publish-test-image.outputs.image-name }} + image: ${{ needs.publish-test-image.outputs.image-name }}:ubuntu-jammy-${{ needs.publish-test-image.outputs.kmir-version }}_${{ needs.publish-test-image.outputs.k-version }}-${{ needs.publish-test-image.outputs.short-sha }} + credentials: + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout code uses: actions/checkout@v4 From 8855356e14d60072bad46df35fcee6a9444a62a5 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 17:10:46 -0600 Subject: [PATCH 43/84] Drop using container approach sponsored by WFs, settings just run it --- .github/workflows/container-test.yml | 13 +- rust-verification-proofs/README.md | 95 + .../maximum-proof/README.md | 98 + .../maximum-proof/main-max-with-lt.rs | 18 + .../maximum-proof/main-max-with-lt.smir.dot | 135 + .../maximum-proof/main-max-with-lt.smir.json | 2676 +++++++++++++++ .../maximum-proof/maximum-spec.k | 73 + .../unchecked_add/unchecked-add.rs | 14 + .../unchecked_add/unchecked-add.smir.dot | 140 + .../unchecked_add/unchecked-add.smir.json | 2969 +++++++++++++++++ .../unchecked_add/unchecked-op-spec.k | 75 + .../unchecked_mul/unchecked-mul.rs | 14 + .../unchecked_mul/unchecked-mul.smir.dot | 140 + .../unchecked_mul/unchecked-mul.smir.json | 2969 +++++++++++++++++ .../unchecked_mul/unchecked-op-spec.k | 73 + .../unchecked_neg/unchecked-neg.rs | 12 + .../unchecked_neg/unchecked-neg.smir.dot | 137 + .../unchecked_neg/unchecked-neg.smir.json | 2339 +++++++++++++ .../unchecked_neg/unchecked-op-spec.k | 71 + .../unchecked_shl/unchecked-op-spec.k | 73 + .../unchecked_shl/unchecked-shl.rs | 13 + .../unchecked_shl/unchecked-shl.smir.dot | 127 + .../unchecked_shl/unchecked-shl.smir.json | 2353 +++++++++++++ .../unchecked_shr/unchecked-op-spec.k | 73 + .../unchecked_shr/unchecked-shr.rs | 13 + .../unchecked_shr/unchecked-shr.smir.dot | 127 + .../unchecked_shr/unchecked-shr.smir.json | 2353 +++++++++++++ .../unchecked_sub/unchecked-op-spec.k | 73 + .../unchecked_sub/unchecked-sub.rs | 14 + .../unchecked_sub/unchecked-sub.smir.dot | 140 + .../unchecked_sub/unchecked-sub.smir.json | 2969 +++++++++++++++++ 31 files changed, 20383 insertions(+), 6 deletions(-) create mode 100644 rust-verification-proofs/README.md create mode 100644 rust-verification-proofs/maximum-proof/README.md create mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.rs create mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot create mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json create mode 100644 rust-verification-proofs/maximum-proof/maximum-spec.k create mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.rs create mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.dot create mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.json create mode 100644 rust-verification-proofs/unchecked_add/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.rs create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json create mode 100644 rust-verification-proofs/unchecked_mul/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.rs create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json create mode 100644 rust-verification-proofs/unchecked_neg/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.rs create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot create mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.rs create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot create mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-op-spec.k create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.rs create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot create mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 002f901d3..33a54986f 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -51,17 +51,18 @@ jobs: needs: publish-test-image permissions: packages: read - container: - image: ${{ needs.publish-test-image.outputs.image-name }}:ubuntu-jammy-${{ needs.publish-test-image.outputs.kmir-version }}_${{ needs.publish-test-image.outputs.k-version }}-${{ needs.publish-test-image.outputs.short-sha }} - credentials: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} steps: - name: Checkout code uses: actions/checkout@v4 with: submodules: recursive - ref: sample-challenge-11-proofs + ref: sample-challenge-11-proofs + - name: Start KMIR Container + run: | + docker run --detach --rm --name kmir --tty --interactive ${{ needs.publish-test-image.outputs.image-name }}:ubuntu-jammy-${{ needs.publish-test-image.outputs.kmir-version }}_${{ needs.publish-test-image.outputs.k-version }}-${{ needs.publish-test-image.outputs.short-sha }} + - name: Stream files to Container + run: | + docker cp rust-verification-proofs kmir:/home/kmir/ - name: kmir Prove run: | cd rust-verification-proofs/unchecked_add diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md new file mode 100644 index 000000000..25ed9b099 --- /dev/null +++ b/rust-verification-proofs/README.md @@ -0,0 +1,95 @@ +# Formal Rust Code Verification Using KMIR + +This subrepository contains a collection of programs and specifications that aim to illustrate how KMIR can be used to validate the properties of Rust programs and the Rust language itself. The code made available in this repository was developed taking as references the challenges present on the [Verify Rust Standard Library Effort](https://model-checking.github.io/verify-rust-std/intro.html). + +## Table of Contents + + +- [Project Setup](#project-setup) +- [Proof 1: Proving a Maximum Finding Function That only Uses `lower-than (<)`](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) +- [Proof 2: Proving Unsafe Arithmetic Operations](#proof-2-proving-unsafe-arithmetic-operations) + +## Project Setup + +In order to run and explore the proofs elaborated here, make sure that KMIR can be locally executed in your machine following the instructions available in [this repository's README file](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs). + +[Be sure to have Rust installed](https://www.rust-lang.org/tools/install) in your machine, have the specific components and toolchain necessary to run KMIR. To guarantee it, with `rustup` installed, run the following commands: + +```bash +rustup component add rust-src rustc-dev llvm-tools-preview +rustup toolchain install nightly-2024-11-29 +rustup default nightly-2024-11-29 +``` + +**(Optional)** Additionally, if you would like to build your own code specifications to be proven with KMIR, install the [Rust Stable MIR Pretty Printing](https://github.com/runtimeverification/stable-mir-json/tree/20820cc6abd8fd22769931a3f8754ee35ab24c05) tool. It won't be necessary to install it if you'd like to understand how KMIR works and to execute its proofs, but it is needed currently to help us traverse program states, as seen in the [steps needed to achieve Proof 1's specification](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). To install the Rust Stable MIR Pretty Printing tool, in the root of this project, run: + +```bash +git submodule update --init --recursive +make stable-mir-json +``` + +The usage of this tool will be abstracted in the future, removing the need to construct claims manually. + +## Proof 1: Proving a Maximum Finding Function That only Uses `lower-than` + +Considering a function that receives three integer arguments, this function should return the highest value among them. Assertions can be used to enforce this condition, and an example code that tests this function can be seen below: + +```Rust +fn main() { + + let a:usize = 42; + let b:usize = -43; + let c:usize = 0; + + let result = maximum(a, b, c); + + assert!(result >= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: usize, b: usize, c: usize) -> usize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} +``` + +Notice in this case that `a`, `b`, and `c` are concrete, fixed values. To turn the parameters of `maximum` into symbolic variables, we can obtain the representation of the function call to `maximum` executed using KMIR and then replace the concrete values of these variables with symbolic values. Furthermore, the assertion specified in the code can be manually translated as a requirement that should be met by the symbolic variables, meaning that any value that they can assume must respect the conditions contained in the specification. Following this approach, we can utilize KMIR to give us formal proof that, for any valid `isize` input, the maximum value among the three parameters will be returned. + +Information on how the specification was created can be found in the longer [description of `maximum-proof`](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). + +To run this proof in your terminal from this folder, execute: + +```Bash +cd maximum-proof +poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof +``` + +## Proof 2: Proving Unsafe Arithmetic Operations + +The proofs in this section concern a section of the challenge of securing [Safety of Methods for Numeric Primitive Types](https://model-checking.github.io/verify-rust-std/challenges/0011-floats-ints.html#challenge-11-safety-of-methods-for-numeric-primitive-types) of the Verify Rust Standard Library Effort. Here, we implement proof of concepts of how KMIR can be used to prove the following unsafe methods according to their undefined behaviors: `unchecked_add`, `unchecked_sub`, `unchecked_mul`, `unchecked_shl`, `unchecked_shr`, and `unchecked_neg`. + +For these functions, the proofs were carried out using variables of the `i16` integer type, and the criteria for triggering undefined behaviors for these methods were obtained in the [i16 type documentation page](https://doc.rust-lang.org/std/primitive.i16.html). + +To obtain the specifications that prove the presence/absence of undefined behavior for these functions, analogous processes to the ones discussed in [Proof 1](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) were performed. + +For an illustration of how we specify the requirements of the proof, which, in this case, are the assertions that would help us detect the presence/absence of undefined behavior in the unsafe methods, let's explore how we can prove safety conditions for the `unchecked_add` operation. Consider the following function: + +https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-add.rs#L11-L14 + +`unchecked_op` is a function that receives two `i16` arguments and executes an `unchecked_add` of the first parameter by the second, returning an `i16` value resulting from this operation. According to the [documentation of the unchecked_add function for the i16 primitive type](https://doc.rust-lang.org/std/primitive.i16.html#method.unchecked_add), considering the safety of this function "This results in undefined behavior when `self + rhs > i16::MAX or self + rhs < i16::MIN`, i.e. when `checked_add` would return `None`". By the process further disclosed in Proof 1, we can obtain a valid representation of a function call for `unchecked_op` and modify the variable values to be symbolic. The next step is to define the conditions these values should meet to verify safety conditions elaborated for `unchecked_add`. To this goal, see the following code snippet: + +https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-op-spec.k#L66-L73 + +The parameters for `unchecked_add` in this specification for KMIR are represented as A and B, which now are symbolic values. To specify the goal of our verification process, we implemented the above code snippet into the specification, which adds a requirement to the execution of our symbolic execution engine. In other words, our proof will only be successful if the specified requirements above are respected. + +In this `requires` clause, first, we use the semantics of K to specify A and B's boundaries, as `i16`s: `0 -Int (1 <= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: usize, b: usize, c: usize) -> usize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} +``` + +We want to prove a property of `maximum`: +- When called with `a`, `b`, and `c`, +- the `result` will be greater or equal all of the arguments, +- and equal to one (or more) of them. + +The `main` program above states this using some concrete values of `a`, `b`, and `c`. We will run this program to construct a general symbolic claim and prove it. + +In a future version, we will be able to start directly with the `maximum` function call and provide symbolic arguments to it. This will save some manual work setting up the claim file and fits the target of proving based on property tests. + +## Extracting Stable MIR for the program + +Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. (Run the below commmands from the `mir-semantics/rust-verification-proofs/maximum-proof/` directory). + +```shell +cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +``` +The Stable MIR for the program can also be rendered as a graph, using the `--dot` option. This creates `main-max-with-lt.smir.dot`. + +```shell +cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs +``` +## Constructing the claim by executing `main` to certain points +Through concrete execution of the parsed K program we can interrupt the execution after a given number of rewrite steps to inspect the intermediate state. This will help us with writing our claim manually until the process is automated. + +1. The program (`main`) reaches the call to `maximum` after 22 steps. + The following command runs it and displays the resulting program state. + + ```shell + poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S + ``` + - Arguments `a`, `b`, and `c` are initialised to `Integer`s as `locals[1]` to `locals[3]` + - A `call` terminator calling function `ty(25)` is executed next (front of the `k` cell) + - The function table contains `ty(25) -> "maximum" code. + - Other state (how `main` continues, its other local variables, and some internal functions) is relevant to the proof we want to perform. +2. The program executes for a total of 92 steps to reach the point where it `return`s from `maximum`. + The following command runs it and displays the resulting program state. + + ```shell + poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S + ``` + - The value `locals[0]` is now set to an `Integer`. This will be the target of our assertions. + - A `return` terminator is executed next (front of the `k` cell), it will return `locals[0]` + - It should be an `Integer` with the desired properties as stated above + +State 1. defines our start state for the claim. Irrelevant parts are elided (replaced by variables). +* The code of the `maximum` function in the `functions` table needs to be kept. We also keep its identifier `ty(25)`. Other functions can be removed (we won't perform a return). +* The `call` terminator is kept, calling `ty(25)` with arguments from `locals[1,2,3]`. `target` is modified to be `noBasicBlockIdx` to force termination of the prover (no block to jump back to). +* The four locals `0` - `3` are required in their original order to provide the function arguments. The values of `a`, `b`, and `c` in locals `1` - `3` are replaced with symbolic variables used in the proof. +* We could keep all other locals but do not have to (however it is important that the list of locals has a known length). +* `main`s other details in `currentFrame` are irrelevant and elided. + + +State 2. is the end state, where all that matters is the returned value. + +* The `locals` list should contain this `?RESULT` value at index `0` +* The `?RESULT` value should have the properties stated (equivalent to the assertion in `main`) +* Because of the modified `target`, the program should end, i.e., have an `#EndProgram` in the `k` cell. + +The above is written as a _claim_ in K framework language into a `maximum-spec.k` file. +Most of the syntax can be copied from the output of the `kmir run` commands above, and irrelevant parts replaced by `_` (LHS) or `?_` (RHS). + +Alternatively, it is possible to construct a claim that the entire rest of the program after initialising the variables will result in the desired `?RESULT`, i.e., the assertion in `main` is executed successfully and the program ends in `#EndProgram` after checking it. This would require more steps. + +## Running the prover on the claim and viewing the proof +Now that we have constructed claim, we can run use the KMIR verifier to perform symbollic execution, and can view the state of proof through the KMIR proof viewer. +```shell +poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof +``` + +The proof steps are saved in the `$PWD/proof` directory for later inspection using `kmir prove view`. This is especially important when the proof does _not_ succeed immediately. + +```shell +poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof +``` diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs new file mode 100644 index 000000000..448c2cb9d --- /dev/null +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs @@ -0,0 +1,18 @@ + +fn main() { + + let a:usize = 42; + let b:usize = 22; + let c:usize = 0; + + let result = maximum(a, b, c); + + assert!(result >= a && result >= b && result >= c + && (result == a || result == b || result == c ) ); +} + +fn maximum(a: usize, b: usize, c: usize) -> usize { + // max(a, max(b, c)) + let max_ab = if a < b {b} else {a}; + if max_ab < c {c} else {max_ab} +} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot new file mode 100644 index 000000000..6da5f7ff3 --- /dev/null +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot @@ -0,0 +1,135 @@ +digraph { + label="main_max_with_lt"; + node [shape=rectangle]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; + Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + subgraph cluster_0 { + label="main"; + style="filled"; + color=palegreen; + X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="4"]; + X37252ea5c5b3ce2a_0 [label="1 <- Use(const :: usize)\l2 <- Use(const :: usize)\l3 <- Use(const :: usize)\lCall\l"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; + X37252ea5c5b3ce2a_1 [label="5 <- Ge(cp(4), cp(1))\lSwitchInt mv(5)\l"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; + X37252ea5c5b3ce2a_2 [label="6 <- Ge(cp(4), cp(2))\lSwitchInt mv(6)\l"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; + X37252ea5c5b3ce2a_3 [label="7 <- Ge(cp(4), cp(3))\lSwitchInt mv(7)\l"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; + X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_4 [label="8 <- Eq(cp(4), cp(1))\lSwitchInt mv(8)\l"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; + X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_5 [label="9 <- Eq(cp(4), cp(2))\lSwitchInt mv(9)\l"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; + X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; + X37252ea5c5b3ce2a_6 [label="10 <- Eq(cp(4), cp(3))\lSwitchInt mv(10)\l"]; + X37252ea5c5b3ce2a_7 [label="Call\l"]; + X37252ea5c5b3ce2a_8 [label="Return\l"]; + } + X37252ea5c5b3ce2a_0 -> X9585eeb1b7d3a83d_0 [label="cp(1),cp(2),cp(3)"]; + X37252ea5c5b3ce2a_7 -> Xac08878333d72e42_0 [label="const :: &str"]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X5c233e009f84aa6c_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X83f8b52e3f0ef4c5_0 -> X83f8b52e3f0ef4c5_1 [label="0"]; + X83f8b52e3f0ef4c5_0 [label="Call\l"]; + X83f8b52e3f0ef4c5_1 -> X83f8b52e3f0ef4c5_2 [label="2"]; + X83f8b52e3f0ef4c5_1 [label="Call\l"]; + X83f8b52e3f0ef4c5_2 [label="Return\l"]; + } + X83f8b52e3f0ef4c5_0 -> X5153bc83e282e268_0 [label="mv(1),const :: ()"]; + X83f8b52e3f0ef4c5_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_3 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X88af70ac7219a434_0 -> X88af70ac7219a434_1 [label="5"]; + X88af70ac7219a434_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; + X88af70ac7219a434_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X88af70ac7219a434_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; + subgraph cluster_4 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X2aeea2bef42114da_0 -> X2aeea2bef42114da_1 [label="0"]; + X2aeea2bef42114da_0 [label="Call\l"]; + X2aeea2bef42114da_1 [label="Return\l"]; + } + X2aeea2bef42114da_0 -> X58ae416f9afa06ac_0 [label="mv(*1),mv(2)"]; + subgraph cluster_5 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X5153bc83e282e268_0 -> X5153bc83e282e268_1 [label="0"]; + X5153bc83e282e268_0 [label="Call\l"]; + X5153bc83e282e268_1 [label="Return\l"]; + } + X5153bc83e282e268_0 -> X5153bc83e282e268_0: 1 [label=""]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + Xf1c2e3e2362b71b1_0 -> Xf1c2e3e2362b71b1_1 [label="3"]; + Xf1c2e3e2362b71b1_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; + Xf1c2e3e2362b71b1_1 -> Xf1c2e3e2362b71b1_2 [label="2"]; + Xf1c2e3e2362b71b1_1 [label="Storage Dead _4\lCall\l"]; + Xf1c2e3e2362b71b1_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xf1c2e3e2362b71b1_0 -> X83f8b52e3f0ef4c5_0 [label="mv(4)"]; + Xf1c2e3e2362b71b1_1 -> X5c233e009f84aa6c_0 [label="mv(3)"]; + subgraph cluster_7 { + label="maximum"; + style="filled"; + color=palegreen; + X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_2 [label="0"]; + X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_1 [label="other"]; + X9585eeb1b7d3a83d_0 [label="5 <- Lt(cp(1), cp(2))\lSwitchInt mv(5)\l"]; + X9585eeb1b7d3a83d_1 -> X9585eeb1b7d3a83d_3; + X9585eeb1b7d3a83d_1 [label="4 <- Use(cp(2))\lGoto\l"]; + X9585eeb1b7d3a83d_2 -> X9585eeb1b7d3a83d_3; + X9585eeb1b7d3a83d_2 [label="4 <- Use(cp(1))\lGoto\l"]; + X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_5 [label="0"]; + X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_4 [label="other"]; + X9585eeb1b7d3a83d_3 [label="7 <- Use(cp(4))\l6 <- Lt(mv(7), cp(3))\lSwitchInt mv(6)\l"]; + X9585eeb1b7d3a83d_4 -> X9585eeb1b7d3a83d_6; + X9585eeb1b7d3a83d_4 [label="0 <- Use(cp(3))\lGoto\l"]; + X9585eeb1b7d3a83d_5 -> X9585eeb1b7d3a83d_6; + X9585eeb1b7d3a83d_5 [label="0 <- Use(cp(4))\lGoto\l"]; + X9585eeb1b7d3a83d_6 [label="Return\l"]; + } + subgraph cluster_8 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_3 [label="Cleanup"]; + X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_1 [label="0"]; + X58ae416f9afa06ac_0 [label="3 <- &mut 1\lCall\l"]; + X58ae416f9afa06ac_1 -> X58ae416f9afa06ac_2; + X58ae416f9afa06ac_1 [label="Drop 1\l"]; + X58ae416f9afa06ac_2 [label="Return\l"]; + X58ae416f9afa06ac_3 -> X58ae416f9afa06ac_4; + X58ae416f9afa06ac_3 [label="Drop 1\l"]; + X58ae416f9afa06ac_4 [label="Resume\l"]; + } + X58ae416f9afa06ac_0 -> Xf1c2e3e2362b71b1_0 [label="mv(3),mv(2)"]; + subgraph cluster_9 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xefb68cd7a0d5be14_0 [label="Return\l"]; + } +} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json new file mode 100644 index 000000000..02182bb8e --- /dev/null +++ b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json @@ -0,0 +1,2676 @@ +{ + "name": "main_max_with_lt", + "crate_id": 5373935543796547206, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 97, + 32, + 38, + 38, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 98, + 32, + 38, + 38, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 62, + 61, + 32, + 99, + 32, + 38, + 38, + 10, + 32, + 32, + 32, + 32, + 40, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 97, + 32, + 124, + 124, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 98, + 32, + 124, + 124, + 32, + 114, + 101, + 115, + 117, + 108, + 116, + 32, + 61, + 61, + 32, + 99, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E" + } + ], + [ + 23, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" + } + ], + [ + 21, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 25, + { + "NormalSym": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E" + } + ], + [ + 27, + { + "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" + } + ], + [ + 33, + { + "NoOpSym": "" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h8f98b99a20edb596E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E", + "mono_item_kind": { + "MonoItemFn": { + "name": "maximum", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 69 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "span": 71 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 70 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 3 + } + }, + "span": 70 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 7, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 73 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 4 + } + } + }, + "span": 73 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 3, + "projection": [] + } + } + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 75 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "span": 77 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + }, + "span": 75 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 78 + } + } + ], + "locals": [ + { + "ty": 26, + "span": 79, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 80, + "mutability": "Not" + }, + { + "ty": 26, + "span": 81, + "mutability": "Not" + }, + { + "ty": 26, + "span": 82, + "mutability": "Not" + }, + { + "ty": 26, + "span": 83, + "mutability": "Not" + }, + { + "ty": 29, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 74, + "mutability": "Mut" + } + ], + "arg_count": 3, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 80, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "c", + "source_info": { + "span": 82, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "max_ab", + "source_info": { + "span": 83, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 84 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 43 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 23, + "id": 7 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + }, + { + "ty": 24, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 10 + } + } + } + } + ] + }, + "span": 52 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 53, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 22, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + } + ] + }, + "span": 53 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 54, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 12 + } + } + } + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 50, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 9 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 51 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 2 + } + } + }, + "span": 55 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 3 + } + } + }, + "span": 56 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Ge", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 57 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 4 + } + } + }, + "span": 57 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 8, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 8 + } + } + }, + "span": 58 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 59 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 9, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 8 + } + } + }, + "span": 59 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 4, + "projection": [] + } + }, + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + }, + "span": 60 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 10, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 7 + ] + ], + "otherwise": 8 + } + } + }, + "span": 60 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 27, + "id": 13 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 110, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 28, + "id": 14 + } + } + } + ], + "destination": { + "local": 11, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 61 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 62 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 63, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 64, + "mutability": "Not" + }, + { + "ty": 26, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 66, + "mutability": "Not" + }, + { + "ty": 26, + "span": 67, + "mutability": "Not" + }, + { + "ty": 29, + "span": 55, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 56, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 57, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 59, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 60, + "mutability": "Mut" + }, + { + "ty": 30, + "span": 61, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 64, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 65, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "c", + "source_info": { + "span": 66, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 67, + "scope": 4 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hd99c80c4d0898bdeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 4, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 44 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 44, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 44 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h739869090782dad0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 43, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 21, + "id": 6 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 22, + "span": 43, + "mutability": "Not" + }, + { + "ty": 1, + "span": 43, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 43 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 46, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 8 + } + } + } + } + ] + }, + "span": 46 + } + ], + "terminator": { + "kind": "Return", + "span": 45 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 47, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 48, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 48, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 49 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 29, + { + "RigidTy": "Bool" + } + ], + [ + 26, + { + "RigidTy": { + "Uint": "Usize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/maximum-proof/maximum-spec.k b/rust-verification-proofs/maximum-proof/maximum-spec.k new file mode 100644 index 000000000..ee506eb8f --- /dev/null +++ b/rust-verification-proofs/maximum-proof/maximum-spec.k @@ -0,0 +1,73 @@ +module MAXIMUM-SPEC + imports KMIR + + claim [maximum-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 50 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 25 ) , // <- this is the reference to `maximum` + id: mirConstId ( 9 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 25 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 64 , false ) , ty ( 26 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 64 , false ) , ty ( 26 ) , _ ) ) + ListItem ( typedValue ( Integer ( C , 64 , false ) , ty ( 26 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 64, false), ty ( 26 ) , ?_ )) + ?_ + + + _ => ?_ + + ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) + + + requires // invariant of the `Integer` constructor + 0 <=Int A + andBool A i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_add(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot b/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot new file mode 100644 index 000000000..079803cdd --- /dev/null +++ b/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_add"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + subgraph cluster_0 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_1 [label="_0"]; + Xecf30c325a77cae0_0 [label="Call\l"]; + Xecf30c325a77cae0_1 [label="Return\l"]; + } + Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_0: _1 [label=""]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xf28f42e91011344a_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X4f9055e3140841d0_0 -> X4f9055e3140841d0_1 [label="_5"]; + X4f9055e3140841d0_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X4f9055e3140841d0_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X4f9055e3140841d0_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_3 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X3d323724ddeb8015_0 -> X3d323724ddeb8015_1 [label="_0"]; + X3d323724ddeb8015_0 [label="Call\l"]; + X3d323724ddeb8015_1 -> X3d323724ddeb8015_2 [label="_2"]; + X3d323724ddeb8015_1 [label="Call\l"]; + X3d323724ddeb8015_2 [label="Return\l"]; + } + X3d323724ddeb8015_0 -> Xecf30c325a77cae0_0 [label="_1,const :: ()"]; + X3d323724ddeb8015_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_4 { + label="main"; + style="filled"; + color=palegreen; + X899bfc87e7e82e90_0 -> X899bfc87e7e82e90_1 [label="_3"]; + X899bfc87e7e82e90_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + X899bfc87e7e82e90_1 -> X899bfc87e7e82e90_2; + X899bfc87e7e82e90_1 [label="_6 <- chkd-Add(_1, _2)\lAssert _6.1 == false\l"]; + X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_6 [label="0"]; + X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_3 [label="other"]; + X899bfc87e7e82e90_2 [label="_5 <- Use(_6.0)\l_4 <- Lt(_5, const :: i16)\lSwitchInt _4\l"]; + X899bfc87e7e82e90_3 -> X899bfc87e7e82e90_4; + X899bfc87e7e82e90_3 [label="_9 <- chkd-Add(_1, _2)\lAssert _9.1 == false\l"]; + X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_6 [label="0"]; + X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_5 [label="other"]; + X899bfc87e7e82e90_4 [label="_8 <- Use(_9.0)\l_7 <- Gt(_8, const :: i16)\lSwitchInt _7\l"]; + X899bfc87e7e82e90_5 [label="Return\l"]; + X899bfc87e7e82e90_6 [label="Call\l"]; + } + X899bfc87e7e82e90_0 -> X7464f1e6ba435b2a_0 [label="_1,_2"]; + X899bfc87e7e82e90_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_5 { + label="core::num::::unchecked_add::prec\nondition_check"; + style="filled"; + color=lightgray; + X3f7834dda050e10_0 -> X3f7834dda050e10_2 [label="0"]; + X3f7834dda050e10_0 -> X3f7834dda050e10_1 [label="other"]; + X3f7834dda050e10_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Add(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + X3f7834dda050e10_1 [label="Call\l"]; + X3f7834dda050e10_2 [label="Return\l"]; + } + X3f7834dda050e10_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_3 [label="Cleanup"]; + Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_1 [label="_0"]; + Xade51bc3a8f52008_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xade51bc3a8f52008_1 -> Xade51bc3a8f52008_2; + Xade51bc3a8f52008_1 [label="Drop _1\l"]; + Xade51bc3a8f52008_2 [label="Return\l"]; + Xade51bc3a8f52008_3 -> Xade51bc3a8f52008_4; + Xade51bc3a8f52008_3 [label="Drop _1\l"]; + Xade51bc3a8f52008_4 [label="Resume\l"]; + } + Xade51bc3a8f52008_0 -> X48be982d2a4cc59b_0 [label="_3,_2"]; + subgraph cluster_7 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X9c80f3743f4f0c10_0 -> X9c80f3743f4f0c10_1 [label="_0"]; + X9c80f3743f4f0c10_0 [label="Call\l"]; + X9c80f3743f4f0c10_1 [label="Return\l"]; + } + X9c80f3743f4f0c10_0 -> Xade51bc3a8f52008_0 [label="_1*,_2"]; + subgraph cluster_8 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X7464f1e6ba435b2a_0 -> X7464f1e6ba435b2a_1 [label="_0"]; + X7464f1e6ba435b2a_0 [label="Call\l"]; + X7464f1e6ba435b2a_1 [label="Return\l"]; + } + X7464f1e6ba435b2a_0 -> X354cc96a778c463_0 [label="_1,_2"]; + subgraph cluster_9 { + label="core::num::::unchecked_add"; + style="filled"; + color=lightgray; + X354cc96a778c463_0 -> X354cc96a778c463_2 [label="0"]; + X354cc96a778c463_0 -> X354cc96a778c463_1 [label="other"]; + X354cc96a778c463_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + X354cc96a778c463_1 -> X354cc96a778c463_2 [label="_4"]; + X354cc96a778c463_1 [label="Call\l"]; + X354cc96a778c463_2 [label="Storage Dead _3\l_0 <- AddUnchecked(_1, _2)\lReturn\l"]; + } + X354cc96a778c463_1 -> X3f7834dda050e10_0 [label="_1,_2"]; + subgraph cluster_10 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X5f7c0242b1a5f905_0 [label="Return\l"]; + } + subgraph cluster_11 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X48be982d2a4cc59b_0 -> X48be982d2a4cc59b_1 [label="_3"]; + X48be982d2a4cc59b_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X48be982d2a4cc59b_1 -> X48be982d2a4cc59b_2 [label="_2"]; + X48be982d2a4cc59b_1 [label="Storage Dead _4\lCall\l"]; + X48be982d2a4cc59b_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X48be982d2a4cc59b_0 -> X3d323724ddeb8015_0 [label="_4"]; + X48be982d2a4cc59b_1 -> Xf28f42e91011344a_0 [label="_3"]; +} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json new file mode 100644 index 000000000..922645c86 --- /dev/null +++ b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json @@ -0,0 +1,2969 @@ +{ + "name": "unchecked_add", + "crate_id": 1100512358528492573, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 97, + 100, + 100, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 40, + 97, + 32, + 43, + 32, + 98, + 32, + 60, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 65, + 88, + 41, + 32, + 38, + 38, + 32, + 40, + 97, + 32, + 43, + 32, + 98, + 32, + 62, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 73, + 78, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E" + } + ], + [ + 35, + { + "NoOpSym": "" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE" + } + ], + [ + 24, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + }, + { + "ty": 31, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17ha7140c6faa1714efE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 70 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 11 + } + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": "Return", + "span": 71 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 74, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 74, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 75 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 93, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 96, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 97, + "mutability": "Not" + }, + { + "ty": 23, + "span": 98, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 97, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 98, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_sum", + "source_info": { + "span": 99, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 8 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 62, + "mutability": "Not" + }, + { + "ty": 23, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_add4main17hd8e1c5b7245124d4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 13 + } + } + } + } + ] + }, + "span": 78 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 213, + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 76, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 12 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 80 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Constant": { + "span": 82, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255, + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 15 + } + } + } + ] + } + ] + }, + "span": 81 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 3 + } + } + }, + "span": 81 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 83 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 83 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + ] + } + ] + }, + "span": 84 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 5 + } + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 86 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 87, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 58, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 18 + } + } + } + ], + "destination": { + "local": 10, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 87 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 89, + "mutability": "Not" + }, + { + "ty": 23, + "span": 90, + "mutability": "Not" + }, + { + "ty": 23, + "span": 91, + "mutability": "Not" + }, + { + "ty": 21, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 87, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 90, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 91, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 92 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_add", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "AddUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 23, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + } + ], + "types": [ + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k new file mode 100644 index 000000000..cc8f79d0c --- /dev/null +++ b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k @@ -0,0 +1,75 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ) + + + requires // i16 invariants + 0 -Int (1 < i16::MAX) && (a * b < i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_mul(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot new file mode 100644 index 000000000..1fd26d6eb --- /dev/null +++ b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_mul"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X8f01db0e36395c71_0 -> X8f01db0e36395c71_1 [label="_0"]; + X8f01db0e36395c71_0 [label="Call\l"]; + X8f01db0e36395c71_1 [label="Return\l"]; + } + X8f01db0e36395c71_0 -> X8f01db0e36395c71_0: _1 [label=""]; + subgraph cluster_1 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X9e222efa6b726605_0 [label="Return\l"]; + } + subgraph cluster_2 { + label="core::num::::unchecked_mul"; + style="filled"; + color=lightgray; + Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_2 [label="0"]; + Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_1 [label="other"]; + Xeba6f5d5a379e29a_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xeba6f5d5a379e29a_1 -> Xeba6f5d5a379e29a_2 [label="_4"]; + Xeba6f5d5a379e29a_1 [label="Call\l"]; + Xeba6f5d5a379e29a_2 [label="Storage Dead _3\l_0 <- MulUnchecked(_1, _2)\lReturn\l"]; + } + Xeba6f5d5a379e29a_1 -> X9b97bece994ebb51_0 [label="_1,_2"]; + subgraph cluster_3 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X62f87ed0bcd6b426_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_4 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X69af4523a03742d5_0 -> X69af4523a03742d5_1 [label="_3"]; + X69af4523a03742d5_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X69af4523a03742d5_1 -> X69af4523a03742d5_2 [label="_2"]; + X69af4523a03742d5_1 [label="Storage Dead _4\lCall\l"]; + X69af4523a03742d5_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X69af4523a03742d5_0 -> Xcb8fb0027af607b6_0 [label="_4"]; + X69af4523a03742d5_1 -> X62f87ed0bcd6b426_0 [label="_3"]; + subgraph cluster_5 { + label="core::num::::unchecked_mul::prec\nondition_check"; + style="filled"; + color=lightgray; + X9b97bece994ebb51_0 -> X9b97bece994ebb51_2 [label="0"]; + X9b97bece994ebb51_0 -> X9b97bece994ebb51_1 [label="other"]; + X9b97bece994ebb51_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Mul(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + X9b97bece994ebb51_1 [label="Call\l"]; + X9b97bece994ebb51_2 [label="Return\l"]; + } + X9b97bece994ebb51_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X797ddd37b7ea3b5e_0 -> X797ddd37b7ea3b5e_1 [label="_5"]; + X797ddd37b7ea3b5e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X797ddd37b7ea3b5e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X797ddd37b7ea3b5e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_7 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + Xcb8fb0027af607b6_0 -> Xcb8fb0027af607b6_1 [label="_0"]; + Xcb8fb0027af607b6_0 [label="Call\l"]; + Xcb8fb0027af607b6_1 -> Xcb8fb0027af607b6_2 [label="_2"]; + Xcb8fb0027af607b6_1 [label="Call\l"]; + Xcb8fb0027af607b6_2 [label="Return\l"]; + } + Xcb8fb0027af607b6_0 -> X8f01db0e36395c71_0 [label="_1,const :: ()"]; + Xcb8fb0027af607b6_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_8 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X201617fc87c04742_0 -> X201617fc87c04742_1 [label="_0"]; + X201617fc87c04742_0 [label="Call\l"]; + X201617fc87c04742_1 [label="Return\l"]; + } + X201617fc87c04742_0 -> X86afcabc1ac42f91_0 [label="_1*,_2"]; + subgraph cluster_9 { + label="main"; + style="filled"; + color=palegreen; + Xe63d82c3b46f3acf_0 -> Xe63d82c3b46f3acf_1 [label="_3"]; + Xe63d82c3b46f3acf_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + Xe63d82c3b46f3acf_1 -> Xe63d82c3b46f3acf_2; + Xe63d82c3b46f3acf_1 [label="_6 <- chkd-Mul(_1, _2)\lAssert _6.1 == false\l"]; + Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_6 [label="0"]; + Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_3 [label="other"]; + Xe63d82c3b46f3acf_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; + Xe63d82c3b46f3acf_3 -> Xe63d82c3b46f3acf_4; + Xe63d82c3b46f3acf_3 [label="_9 <- chkd-Mul(_1, _2)\lAssert _9.1 == false\l"]; + Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_6 [label="0"]; + Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_5 [label="other"]; + Xe63d82c3b46f3acf_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; + Xe63d82c3b46f3acf_5 [label="Return\l"]; + Xe63d82c3b46f3acf_6 [label="Call\l"]; + } + Xe63d82c3b46f3acf_0 -> Xbe62f93610b866bf_0 [label="_1,_2"]; + Xe63d82c3b46f3acf_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_3 [label="Cleanup"]; + X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_1 [label="_0"]; + X86afcabc1ac42f91_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X86afcabc1ac42f91_1 -> X86afcabc1ac42f91_2; + X86afcabc1ac42f91_1 [label="Drop _1\l"]; + X86afcabc1ac42f91_2 [label="Return\l"]; + X86afcabc1ac42f91_3 -> X86afcabc1ac42f91_4; + X86afcabc1ac42f91_3 [label="Drop _1\l"]; + X86afcabc1ac42f91_4 [label="Resume\l"]; + } + X86afcabc1ac42f91_0 -> X69af4523a03742d5_0 [label="_3,_2"]; + subgraph cluster_11 { + label="unchecked_op"; + style="filled"; + color=palegreen; + Xbe62f93610b866bf_0 -> Xbe62f93610b866bf_1 [label="_0"]; + Xbe62f93610b866bf_0 [label="Call\l"]; + Xbe62f93610b866bf_1 [label="Return\l"]; + } + Xbe62f93610b866bf_0 -> Xeba6f5d5a379e29a_0 [label="_1,_2"]; +} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json new file mode 100644 index 000000000..854f39e8c --- /dev/null +++ b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json @@ -0,0 +1,2969 @@ +{ + "name": "unchecked_mul", + "crate_id": 5290701492876642493, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 40, + 97, + 32, + 42, + 32, + 98, + 32, + 62, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 65, + 88, + 41, + 32, + 38, + 38, + 32, + 40, + 97, + 32, + 42, + 32, + 98, + 32, + 60, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 73, + 78, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 109, + 117, + 108, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 24, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE" + } + ], + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN13unchecked_mul4main17h0cc64cae78556d0bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 13 + } + } + } + } + ] + }, + "span": 78 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 213, + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 76, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 12 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 80 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Constant": { + "span": 82, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255, + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 15 + } + } + } + ] + } + ] + }, + "span": 81 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 3 + } + } + }, + "span": 81 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 83 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 83 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + ] + } + ] + }, + "span": 84 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 5 + } + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 86 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 87, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 58, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 18 + } + } + } + ], + "destination": { + "local": 10, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 87 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 89, + "mutability": "Not" + }, + { + "ty": 23, + "span": 90, + "mutability": "Not" + }, + { + "ty": 23, + "span": 91, + "mutability": "Not" + }, + { + "ty": 21, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 87, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 90, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 91, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 92 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + }, + { + "ty": 31, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 93, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 96, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 97, + "mutability": "Not" + }, + { + "ty": 23, + "span": 98, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 97, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 98, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 99, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 11 + } + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": "Return", + "span": 71 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 74, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 74, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 75 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_mul", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "MulUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 23, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 70 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hfdc6fe355496207dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_mul::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Mul", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 8 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 62, + "mutability": "Not" + }, + { + "ty": 23, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + } + ], + "types": [ + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k new file mode 100644 index 000000000..5e13f0298 --- /dev/null +++ b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k @@ -0,0 +1,73 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ) + + requires // i16 invariants + 0 -Int (1 < i16 { + let unchecked_res = unsafe { a.unchecked_neg() }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot new file mode 100644 index 000000000..f0e5d18e2 --- /dev/null +++ b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot @@ -0,0 +1,137 @@ +digraph { + label="unchecked_neg"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8fc2060ad58510d8_0 [label="Intr: \ncold_path", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="core::num::::unchecked_neg::prec\nondition_check"; + style="filled"; + color=lightgray; + X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_3 [label="0"]; + X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_1 [label="other"]; + X4dfedea7d15dfae0_0 [label="Storage Live _3\l_3 <- Eq(_1, const :: i16)\lSwitchInt _3\l"]; + X4dfedea7d15dfae0_1 -> X4dfedea7d15dfae0_2 [label="_4"]; + X4dfedea7d15dfae0_1 [label="Call\l"]; + X4dfedea7d15dfae0_2 [label="Storage Dead _3\lCall\l"]; + X4dfedea7d15dfae0_3 [label="Storage Dead _3\lReturn\l"]; + } + X4dfedea7d15dfae0_1 -> X8fc2060ad58510d8_0 [label=""]; + X4dfedea7d15dfae0_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_1 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xc472594511031ccd_0 [label="Return\l"]; + } + subgraph cluster_2 { + label="main"; + style="filled"; + color=palegreen; + X83ac00eefa6b73fd_0 -> X83ac00eefa6b73fd_1 [label="_1"]; + X83ac00eefa6b73fd_0 [label="_2 <- Use(const :: i16)\lCall\l"]; + X83ac00eefa6b73fd_1 [label="Return\l"]; + } + X83ac00eefa6b73fd_0 -> X25395281e54f77f2_0 [label="_2"]; + subgraph cluster_3 { + label="std::intrinsics::cold_pat\nh"; + style="filled"; + color=lightgray; + X3664cff3ef814fcc_0 [label="Return\l"]; + } + subgraph cluster_4 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X1e8170c41331abcf_0 -> X1e8170c41331abcf_1 [label="_3"]; + X1e8170c41331abcf_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X1e8170c41331abcf_1 -> X1e8170c41331abcf_2 [label="_2"]; + X1e8170c41331abcf_1 [label="Storage Dead _4\lCall\l"]; + X1e8170c41331abcf_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X1e8170c41331abcf_0 -> Xfd6302c9a18672af_0 [label="_4"]; + X1e8170c41331abcf_1 -> Xd2fa5dcfbfecedff_0 [label="_3"]; + subgraph cluster_5 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + Xfd6302c9a18672af_0 -> Xfd6302c9a18672af_1 [label="_0"]; + Xfd6302c9a18672af_0 [label="Call\l"]; + Xfd6302c9a18672af_1 -> Xfd6302c9a18672af_2 [label="_2"]; + Xfd6302c9a18672af_1 [label="Call\l"]; + Xfd6302c9a18672af_2 [label="Return\l"]; + } + Xfd6302c9a18672af_0 -> Xab2b2ee52cc1a3b6_0 [label="_1,const :: ()"]; + Xfd6302c9a18672af_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_6 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X25395281e54f77f2_0 -> X25395281e54f77f2_1 [label="_0"]; + X25395281e54f77f2_0 [label="Call\l"]; + X25395281e54f77f2_1 [label="Return\l"]; + } + X25395281e54f77f2_0 -> X36f7f4bce11fe0f_0 [label="_1"]; + subgraph cluster_7 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xd2fa5dcfbfecedff_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_8 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_1 [label="_0"]; + Xab2b2ee52cc1a3b6_0 [label="Call\l"]; + Xab2b2ee52cc1a3b6_1 [label="Return\l"]; + } + Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_0: _1 [label=""]; + subgraph cluster_9 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xa028f493aff12071_0 -> Xa028f493aff12071_1 [label="_0"]; + Xa028f493aff12071_0 [label="Call\l"]; + Xa028f493aff12071_1 [label="Return\l"]; + } + Xa028f493aff12071_0 -> X39f0dcc2beb3cbfc_0 [label="_1*,_2"]; + subgraph cluster_10 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_3 [label="Cleanup"]; + X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_1 [label="_0"]; + X39f0dcc2beb3cbfc_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X39f0dcc2beb3cbfc_1 -> X39f0dcc2beb3cbfc_2; + X39f0dcc2beb3cbfc_1 [label="Drop _1\l"]; + X39f0dcc2beb3cbfc_2 [label="Return\l"]; + X39f0dcc2beb3cbfc_3 -> X39f0dcc2beb3cbfc_4; + X39f0dcc2beb3cbfc_3 [label="Drop _1\l"]; + X39f0dcc2beb3cbfc_4 [label="Resume\l"]; + } + X39f0dcc2beb3cbfc_0 -> X1e8170c41331abcf_0 [label="_3,_2"]; + subgraph cluster_11 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X1752551397e242d3_0 -> X1752551397e242d3_1 [label="_5"]; + X1752551397e242d3_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X1752551397e242d3_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X1752551397e242d3_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_12 { + label="core::num::::unchecked_neg"; + style="filled"; + color=lightgray; + X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_2 [label="0"]; + X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_1 [label="other"]; + X36f7f4bce11fe0f_0 [label="Storage Live _2\l_2 <- UbChecks :: bool\lSwitchInt _2\l"]; + X36f7f4bce11fe0f_1 -> X36f7f4bce11fe0f_2 [label="_3"]; + X36f7f4bce11fe0f_1 [label="Call\l"]; + X36f7f4bce11fe0f_2 [label="Storage Dead _2\l_0 <- SubUnchecked(const :: i16, _1)\lReturn\l"]; + } + X36f7f4bce11fe0f_1 -> X4dfedea7d15dfae0_0 [label="_1"]; +} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json new file mode 100644 index 000000000..a97297a9a --- /dev/null +++ b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json @@ -0,0 +1,2339 @@ +{ + "name": "unchecked_neg", + "crate_id": 8515610171801290459, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 110, + 101, + 103, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E" + } + ], + [ + 25, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE" + } + ], + [ + 24, + { + "IntrinsicSym": "cold_path" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_neg", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 46 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 47 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 46 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 48, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 49 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 2 + }, + "span": 51 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Constant": { + "span": 52, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 7 + } + } + }, + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + } + ] + }, + "span": 53 + } + ], + "terminator": { + "kind": "Return", + "span": 50 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 55, + "mutability": "Not" + }, + { + "ty": 21, + "span": 46, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 49, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 55, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 56 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 14 + } + } + } + } + ] + }, + "span": 75 + } + ], + "terminator": { + "kind": "Return", + "span": 74 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 76, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 77, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 77, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 78 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_neg4main17h279e62d4b439df5fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 9, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 81, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + } + ] + }, + "span": 82 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 15 + } + } + }, + "args": [ + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 83 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 85, + "mutability": "Not" + }, + { + "ty": 23, + "span": 82, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 86, + "scope": 1 + }, + "composite": null, + "value": { + "Const": { + "span": 81, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 85, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 87 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 6, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 13 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 72, + "mutability": "Not" + }, + { + "ty": 1, + "span": 72, + "mutability": "Not" + }, + { + "ty": 31, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_neg::precondition_check", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 58 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 59, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 8 + } + } + } + ] + } + ] + }, + "span": 58 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 1 + } + } + }, + "span": 57 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 9 + } + } + }, + "args": [], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 61 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 65 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 62, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 10 + } + } + }, + "args": [ + { + "Constant": { + "span": 63, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 11 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 64 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 65 + } + ], + "terminator": { + "kind": "Return", + "span": 66 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 67, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 68, + "mutability": "Not" + }, + { + "ty": 27, + "span": 64, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 61, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 68, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 69, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 70, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 71 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 12 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 72, + "mutability": "Not" + }, + { + "ty": 1, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 72 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 72, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 72, + "mutability": "Not" + }, + { + "ty": 1, + "span": 72, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 72 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 10, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 88, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 89 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 90 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 91, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 92, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 92, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 93, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 94 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::intrinsics::cold_path", + "id": 3, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 43 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 44, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [], + "spread_arg": null, + "span": 45 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 7, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 73 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 73, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 73 + } + } + }, + "details": null + } + ], + "types": [ + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k new file mode 100644 index 000000000..6716fe2fb --- /dev/null +++ b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k @@ -0,0 +1,71 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 79 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 15 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) + ) + + requires // i16 invariants + 0 -Int (1 < + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 71 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 13 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + ) + + requires // i16 invariants + 0 -Int (1 < i16 { + let unchecked_res = unsafe { a.unchecked_shl(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot new file mode 100644 index 000000000..b621a4e00 --- /dev/null +++ b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot @@ -0,0 +1,127 @@ +digraph { + label="unchecked_shl"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + subgraph cluster_0 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X7ca0ff879d4d13eb_0 -> X7ca0ff879d4d13eb_1 [label="_0"]; + X7ca0ff879d4d13eb_0 [label="Call\l"]; + X7ca0ff879d4d13eb_1 [label="Return\l"]; + } + X7ca0ff879d4d13eb_0 -> Xf64250b1070257e5_0 [label="_1*,_2"]; + subgraph cluster_1 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_1 [label="_0"]; + Xca73baf8b721e82c_0 [label="Call\l"]; + Xca73baf8b721e82c_1 [label="Return\l"]; + } + Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_0: _1 [label=""]; + subgraph cluster_2 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X6985b604fd3ae6be_0 -> X6985b604fd3ae6be_1 [label="_0"]; + X6985b604fd3ae6be_0 [label="Call\l"]; + X6985b604fd3ae6be_1 [label="Return\l"]; + } + X6985b604fd3ae6be_0 -> Xe1c01b35d6c2026f_0 [label="_1,_2"]; + subgraph cluster_3 { + label="core::num::::unchecked_shl"; + style="filled"; + color=lightgray; + Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_2 [label="0"]; + Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_1 [label="other"]; + Xe1c01b35d6c2026f_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xe1c01b35d6c2026f_1 -> Xe1c01b35d6c2026f_2 [label="_4"]; + Xe1c01b35d6c2026f_1 [label="Call\l"]; + Xe1c01b35d6c2026f_2 [label="Storage Dead _3\l_0 <- ShlUnchecked(_1, _2)\lReturn\l"]; + } + Xe1c01b35d6c2026f_1 -> X739610367822bd9b_0 [label="_2"]; + subgraph cluster_4 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xf64250b1070257e5_0 -> Xf64250b1070257e5_3 [label="Cleanup"]; + Xf64250b1070257e5_0 -> Xf64250b1070257e5_1 [label="_0"]; + Xf64250b1070257e5_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xf64250b1070257e5_1 -> Xf64250b1070257e5_2; + Xf64250b1070257e5_1 [label="Drop _1\l"]; + Xf64250b1070257e5_2 [label="Return\l"]; + Xf64250b1070257e5_3 -> Xf64250b1070257e5_4; + Xf64250b1070257e5_3 [label="Drop _1\l"]; + Xf64250b1070257e5_4 [label="Resume\l"]; + } + Xf64250b1070257e5_0 -> X8c1d75f364744448_0 [label="_3,_2"]; + subgraph cluster_5 { + label="core::num::::unchecked_shl::prec\nondition_check"; + style="filled"; + color=lightgray; + X739610367822bd9b_0 -> X739610367822bd9b_2 [label="0"]; + X739610367822bd9b_0 -> X739610367822bd9b_1 [label="other"]; + X739610367822bd9b_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; + X739610367822bd9b_1 [label="Storage Dead _2\lReturn\l"]; + X739610367822bd9b_2 [label="Call\l"]; + } + X739610367822bd9b_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X8c1d75f364744448_0 -> X8c1d75f364744448_1 [label="_3"]; + X8c1d75f364744448_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X8c1d75f364744448_1 -> X8c1d75f364744448_2 [label="_2"]; + X8c1d75f364744448_1 [label="Storage Dead _4\lCall\l"]; + X8c1d75f364744448_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X8c1d75f364744448_0 -> X92deb757c4463693_0 [label="_4"]; + X8c1d75f364744448_1 -> X9e057dae70d0b216_0 [label="_3"]; + subgraph cluster_7 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xebd6923e157bf244_0 [label="Return\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + Xd9564944a8357ebc_0 -> Xd9564944a8357ebc_1 [label="_5"]; + Xd9564944a8357ebc_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + Xd9564944a8357ebc_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + Xd9564944a8357ebc_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_9 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X92deb757c4463693_0 -> X92deb757c4463693_1 [label="_0"]; + X92deb757c4463693_0 [label="Call\l"]; + X92deb757c4463693_1 -> X92deb757c4463693_2 [label="_2"]; + X92deb757c4463693_1 [label="Call\l"]; + X92deb757c4463693_2 [label="Return\l"]; + } + X92deb757c4463693_0 -> Xca73baf8b721e82c_0 [label="_1,const :: ()"]; + X92deb757c4463693_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_10 { + label="main"; + style="filled"; + color=palegreen; + Xb244b26227a3c207_0 -> Xb244b26227a3c207_1 [label="_1"]; + Xb244b26227a3c207_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; + Xb244b26227a3c207_1 [label="Return\l"]; + } + Xb244b26227a3c207_0 -> X6985b604fd3ae6be_0 [label="_2,_3"]; + subgraph cluster_11 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X9e057dae70d0b216_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } +} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json new file mode 100644 index 000000000..304a8ec60 --- /dev/null +++ b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json @@ -0,0 +1,2353 @@ +{ + "name": "unchecked_shl", + "crate_id": 2438242285894030786, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 104, + 108, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 25, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h4b70c8118c54af25E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 16 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 85 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 86, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 87, + "mutability": "Not" + }, + { + "ty": 24, + "span": 88, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 87, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 88, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 90 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 11 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + }, + { + "ty": 31, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shl::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 16, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 7 + } + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 2 + }, + "span": 57 + } + ], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 8 + } + } + }, + "args": [ + { + "Constant": { + "span": 59, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 9 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 60 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 62, + "mutability": "Not" + }, + { + "ty": 21, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 60, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "rhs", + "source_info": { + "span": 62, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 63 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 65 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 67, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 12 + } + } + } + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": "Return", + "span": 66 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 69, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_shl4main17h99915c6a84d89e82E", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + } + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 71, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 77 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 78, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 79, + "mutability": "Not" + }, + { + "ty": 23, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 80, + "scope": 1 + }, + "composite": null, + "value": { + "Const": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 79, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 82 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shl", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "ShlUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 24, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + } + ], + "types": [ + [ + 24, + { + "RigidTy": { + "Uint": "U32" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k new file mode 100644 index 000000000..88c672c3c --- /dev/null +++ b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k @@ -0,0 +1,73 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 71 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 13 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) + ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) + ) + + requires // i16 invariants + 0 -Int (1 < i16 { + let unchecked_res = unsafe { a.unchecked_shr(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot new file mode 100644 index 000000000..4bfe94015 --- /dev/null +++ b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot @@ -0,0 +1,127 @@ +digraph { + label="unchecked_shr"; + node [shape=rectangle]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + subgraph cluster_0 { + label="core::num::::unchecked_shr"; + style="filled"; + color=lightgray; + X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_2 [label="0"]; + X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_1 [label="other"]; + X3dfb10421593b1e8_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + X3dfb10421593b1e8_1 -> X3dfb10421593b1e8_2 [label="_4"]; + X3dfb10421593b1e8_1 [label="Call\l"]; + X3dfb10421593b1e8_2 [label="Storage Dead _3\l_0 <- ShrUnchecked(_1, _2)\lReturn\l"]; + } + X3dfb10421593b1e8_1 -> X67406d0b881e84da_0 [label="_2"]; + subgraph cluster_1 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X1fcbbfbc6742d998_0 -> X1fcbbfbc6742d998_1 [label="_5"]; + X1fcbbfbc6742d998_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X1fcbbfbc6742d998_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X1fcbbfbc6742d998_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_2 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X2ea79ec23c0f6969_0 -> X2ea79ec23c0f6969_1 [label="_0"]; + X2ea79ec23c0f6969_0 [label="Call\l"]; + X2ea79ec23c0f6969_1 [label="Return\l"]; + } + X2ea79ec23c0f6969_0 -> X3dfb10421593b1e8_0 [label="_1,_2"]; + subgraph cluster_3 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X308478c52589b452_0 -> X308478c52589b452_1 [label="_0"]; + X308478c52589b452_0 [label="Call\l"]; + X308478c52589b452_1 [label="Return\l"]; + } + X308478c52589b452_0 -> X308478c52589b452_0: _1 [label=""]; + subgraph cluster_4 { + label="main"; + style="filled"; + color=palegreen; + X74e505ee082dcd3c_0 -> X74e505ee082dcd3c_1 [label="_1"]; + X74e505ee082dcd3c_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; + X74e505ee082dcd3c_1 [label="Return\l"]; + } + X74e505ee082dcd3c_0 -> X2ea79ec23c0f6969_0 [label="_2,_3"]; + subgraph cluster_5 { + label="core::num::::unchecked_shr::prec\nondition_check"; + style="filled"; + color=lightgray; + X67406d0b881e84da_0 -> X67406d0b881e84da_2 [label="0"]; + X67406d0b881e84da_0 -> X67406d0b881e84da_1 [label="other"]; + X67406d0b881e84da_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; + X67406d0b881e84da_1 [label="Storage Dead _2\lReturn\l"]; + X67406d0b881e84da_2 [label="Call\l"]; + } + X67406d0b881e84da_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_6 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X63a912d85dcf5dbc_0 -> X63a912d85dcf5dbc_1 [label="_0"]; + X63a912d85dcf5dbc_0 [label="Call\l"]; + X63a912d85dcf5dbc_1 [label="Return\l"]; + } + X63a912d85dcf5dbc_0 -> Xc86fbb6bb8f835bf_0 [label="_1*,_2"]; + subgraph cluster_7 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + X8f6613fb2e5e284f_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_8 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + Xc5c68a464c01d1d6_0 -> Xc5c68a464c01d1d6_1 [label="_3"]; + Xc5c68a464c01d1d6_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + Xc5c68a464c01d1d6_1 -> Xc5c68a464c01d1d6_2 [label="_2"]; + Xc5c68a464c01d1d6_1 [label="Storage Dead _4\lCall\l"]; + Xc5c68a464c01d1d6_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + Xc5c68a464c01d1d6_0 -> X418d756885456e9e_0 [label="_4"]; + Xc5c68a464c01d1d6_1 -> X8f6613fb2e5e284f_0 [label="_3"]; + subgraph cluster_9 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + Xa8d344f9e18404f4_0 [label="Return\l"]; + } + subgraph cluster_10 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X418d756885456e9e_0 -> X418d756885456e9e_1 [label="_0"]; + X418d756885456e9e_0 [label="Call\l"]; + X418d756885456e9e_1 -> X418d756885456e9e_2 [label="_2"]; + X418d756885456e9e_1 [label="Call\l"]; + X418d756885456e9e_2 [label="Return\l"]; + } + X418d756885456e9e_0 -> X308478c52589b452_0 [label="_1,const :: ()"]; + X418d756885456e9e_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_11 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_3 [label="Cleanup"]; + Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_1 [label="_0"]; + Xc86fbb6bb8f835bf_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + Xc86fbb6bb8f835bf_1 -> Xc86fbb6bb8f835bf_2; + Xc86fbb6bb8f835bf_1 [label="Drop _1\l"]; + Xc86fbb6bb8f835bf_2 [label="Return\l"]; + Xc86fbb6bb8f835bf_3 -> Xc86fbb6bb8f835bf_4; + Xc86fbb6bb8f835bf_3 [label="Drop _1\l"]; + Xc86fbb6bb8f835bf_4 [label="Resume\l"]; + } + Xc86fbb6bb8f835bf_0 -> Xc5c68a464c01d1d6_0 [label="_3,_2"]; +} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json new file mode 100644 index 000000000..a18deb336 --- /dev/null +++ b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json @@ -0,0 +1,2353 @@ +{ + "name": "unchecked_shr", + "crate_id": 11374706484823853070, + "allocs": [ + [ + 1, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 104, + 114, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E" + } + ], + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E" + } + ], + [ + 25, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 83, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 16 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 85 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 86, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 87, + "mutability": "Not" + }, + { + "ty": 24, + "span": 88, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 87, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 88, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_res", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 90 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 65 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 65, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 65, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 65 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17hd2b815e8bd96d253E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 64 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 11 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + }, + { + "ty": 31, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 67, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 12 + } + } + } + } + ] + }, + "span": 67 + } + ], + "terminator": { + "kind": "Return", + "span": 66 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 68, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 69, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 74 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + } + } + ] + }, + "span": 76 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 71, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 13 + } + } + }, + "args": [ + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 72 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 77 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 78, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 79, + "mutability": "Not" + }, + { + "ty": 23, + "span": 74, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 76, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 80, + "scope": 1 + }, + "composite": null, + "value": { + "Const": { + "span": 73, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 81, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 75, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 4, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 15 + } + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 79, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 82 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 64, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 64 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 64 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 64, + "mutability": "Not" + }, + { + "ty": 1, + "span": 64, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 64 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shr::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 54 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 55, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 16, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 4, + "mutability": "Mut" + } + }, + "ty": 24, + "id": 7 + } + } + } + ] + } + ] + }, + "span": 54 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 2 + }, + "span": 57 + } + ], + "terminator": { + "kind": "Return", + "span": 56 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 58, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 25, + "id": 8 + } + } + }, + "args": [ + { + "Constant": { + "span": 59, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 26, + "id": 9 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 60 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 61, + "mutability": "Mut" + }, + { + "ty": 24, + "span": 62, + "mutability": "Not" + }, + { + "ty": 21, + "span": 54, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 60, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "rhs", + "source_info": { + "span": 62, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 63 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_shr", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "ShrUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 24, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + } + ], + "types": [ + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 24, + { + "RigidTy": { + "Uint": "U32" + } + } + ], + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ] + ], + "debug": null +} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k new file mode 100644 index 000000000..4730bf3a4 --- /dev/null +++ b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k @@ -0,0 +1,73 @@ +module UNCHECKED-OP-SPEC + imports KMIR + + claim [unchecked-op-spec]: + + ( // LHS, start state + #execTerminator ( + terminator (... + kind: terminatorKindCall (... + func: operandConstant ( + constOperand (... + span: span ( 76 ) , + userTy: noUserTypeAnnotationIndex , + const: mirConst (... + kind: constantKindZeroSized , + ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` + id: mirConstId ( 12 ) + ) + ) + ) , + args: + operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) + operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), + destination: DEST, + target: noBasicBlockIdx, + // forcing the proof to stop because there is no caller to return to + unwind: _ + ), + span: _ + ) + ) + => + // RHS: target + // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) + #EndProgram + ) + ~> .K + + _ + _ => ty ( 32 ) + + _ => ?_ + _ => ?_ + _ => DEST + _ => noBasicBlockIdx + _ => ?_ + + ListItem ( _ ) + ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) + ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) + // _ // if we keep this we need a lemma for list size predicate simplification + => + ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) + ?_ + + + _ => ?_ + + ( + ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) + ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) + ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) + ) + + requires // i16 invariants + 0 -Int (1 < i16::MAX) && (a - b < i16::MIN)); +} + +fn unchecked_op(a: i16, b: i16) -> i16 { + let unchecked_res = unsafe { a.unchecked_sub(b) }; + unchecked_res +} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot new file mode 100644 index 000000000..7dd70579e --- /dev/null +++ b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot @@ -0,0 +1,140 @@ +digraph { + label="unchecked_sub"; + node [shape=rectangle]; + X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; + X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; + X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; + Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; + X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; + subgraph cluster_0 { + label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; + style="filled"; + color=lightgray; + X6ed7f5222f8fff3d_0 -> X6ed7f5222f8fff3d_1 [label="_0"]; + X6ed7f5222f8fff3d_0 [label="Call\l"]; + X6ed7f5222f8fff3d_1 -> X6ed7f5222f8fff3d_2 [label="_2"]; + X6ed7f5222f8fff3d_1 [label="Call\l"]; + X6ed7f5222f8fff3d_2 [label="Return\l"]; + } + X6ed7f5222f8fff3d_0 -> X2c1ab9ccb2ee2902_0 [label="_1,const :: ()"]; + X6ed7f5222f8fff3d_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; + subgraph cluster_1 { + label="<() \nas \nstd::process::Termination\n>::report"; + style="filled"; + color=lightgray; + Xb356150a39730498_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; + } + subgraph cluster_2 { + label="core::num::::unchecked_sub"; + style="filled"; + color=lightgray; + Xe89ce436dda28930_0 -> Xe89ce436dda28930_2 [label="0"]; + Xe89ce436dda28930_0 -> Xe89ce436dda28930_1 [label="other"]; + Xe89ce436dda28930_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; + Xe89ce436dda28930_1 -> Xe89ce436dda28930_2 [label="_4"]; + Xe89ce436dda28930_1 [label="Call\l"]; + Xe89ce436dda28930_2 [label="Storage Dead _3\l_0 <- SubUnchecked(_1, _2)\lReturn\l"]; + } + Xe89ce436dda28930_1 -> Xd6d8542b139753eb_0 [label="_1,_2"]; + subgraph cluster_3 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X4d9411a803faadfe_0 -> X4d9411a803faadfe_3 [label="Cleanup"]; + X4d9411a803faadfe_0 -> X4d9411a803faadfe_1 [label="_0"]; + X4d9411a803faadfe_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; + X4d9411a803faadfe_1 -> X4d9411a803faadfe_2; + X4d9411a803faadfe_1 [label="Drop _1\l"]; + X4d9411a803faadfe_2 [label="Return\l"]; + X4d9411a803faadfe_3 -> X4d9411a803faadfe_4; + X4d9411a803faadfe_3 [label="Drop _1\l"]; + X4d9411a803faadfe_4 [label="Resume\l"]; + } + X4d9411a803faadfe_0 -> X396121085053712_0 [label="_3,_2"]; + subgraph cluster_4 { + label=">::ca\nll_once"; + style="filled"; + color=lightgray; + X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_1 [label="_0"]; + X2c1ab9ccb2ee2902_0 [label="Call\l"]; + X2c1ab9ccb2ee2902_1 [label="Return\l"]; + } + X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_0: _1 [label=""]; + subgraph cluster_5 { + label="main"; + style="filled"; + color=palegreen; + X4f441ab82149a815_0 -> X4f441ab82149a815_1 [label="_3"]; + X4f441ab82149a815_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; + X4f441ab82149a815_1 -> X4f441ab82149a815_2; + X4f441ab82149a815_1 [label="_6 <- chkd-Sub(_1, _2)\lAssert _6.1 == false\l"]; + X4f441ab82149a815_2 -> X4f441ab82149a815_6 [label="0"]; + X4f441ab82149a815_2 -> X4f441ab82149a815_3 [label="other"]; + X4f441ab82149a815_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; + X4f441ab82149a815_3 -> X4f441ab82149a815_4; + X4f441ab82149a815_3 [label="_9 <- chkd-Sub(_1, _2)\lAssert _9.1 == false\l"]; + X4f441ab82149a815_4 -> X4f441ab82149a815_6 [label="0"]; + X4f441ab82149a815_4 -> X4f441ab82149a815_5 [label="other"]; + X4f441ab82149a815_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; + X4f441ab82149a815_5 [label="Return\l"]; + X4f441ab82149a815_6 [label="Call\l"]; + } + X4f441ab82149a815_0 -> X949dd9980f2a3388_0 [label="_1,_2"]; + X4f441ab82149a815_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; + subgraph cluster_6 { + label="core::num::::unchecked_sub::prec\nondition_check"; + style="filled"; + color=lightgray; + Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_2 [label="0"]; + Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_1 [label="other"]; + Xd6d8542b139753eb_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Sub(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; + Xd6d8542b139753eb_1 [label="Call\l"]; + Xd6d8542b139753eb_2 [label="Return\l"]; + } + Xd6d8542b139753eb_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; + subgraph cluster_7 { + label="std::rt::lang_start::<()>\n::{closure#0}"; + style="filled"; + color=lightgray; + X396121085053712_0 -> X396121085053712_1 [label="_3"]; + X396121085053712_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; + X396121085053712_1 -> X396121085053712_2 [label="_2"]; + X396121085053712_1 [label="Storage Dead _4\lCall\l"]; + X396121085053712_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; + } + X396121085053712_0 -> X6ed7f5222f8fff3d_0 [label="_4"]; + X396121085053712_1 -> Xb356150a39730498_0 [label="_3"]; + subgraph cluster_8 { + label="std::rt::lang_start::<()>"; + style="filled"; + color=lightgray; + X3d6480ec228be4ec_0 -> X3d6480ec228be4ec_1 [label="_5"]; + X3d6480ec228be4ec_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; + X3d6480ec228be4ec_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; + } + X3d6480ec228be4ec_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; + subgraph cluster_9 { + label="unchecked_op"; + style="filled"; + color=palegreen; + X949dd9980f2a3388_0 -> X949dd9980f2a3388_1 [label="_0"]; + X949dd9980f2a3388_0 [label="Call\l"]; + X949dd9980f2a3388_1 [label="Return\l"]; + } + X949dd9980f2a3388_0 -> Xe89ce436dda28930_0 [label="_1,_2"]; + subgraph cluster_10 { + label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; + style="filled"; + color=lightgray; + X7cb88635fb24da5a_0 [label="Return\l"]; + } + subgraph cluster_11 { + label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; + style="filled"; + color=lightgray; + X41331acabe05b18d_0 -> X41331acabe05b18d_1 [label="_0"]; + X41331acabe05b18d_0 [label="Call\l"]; + X41331acabe05b18d_1 [label="Return\l"]; + } + X41331acabe05b18d_0 -> X4d9411a803faadfe_0 [label="_1*,_2"]; +} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json new file mode 100644 index 000000000..9559219eb --- /dev/null +++ b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json @@ -0,0 +1,2969 @@ +{ + "name": "unchecked_sub", + "crate_id": 17961444647620661476, + "allocs": [ + [ + 2, + { + "Memory": { + "bytes": [ + 97, + 115, + 115, + 101, + 114, + 116, + 105, + 111, + 110, + 32, + 102, + 97, + 105, + 108, + 101, + 100, + 58, + 32, + 40, + 97, + 32, + 45, + 32, + 98, + 32, + 62, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 65, + 88, + 41, + 32, + 38, + 38, + 32, + 40, + 97, + 32, + 45, + 32, + 98, + 32, + 60, + 32, + 105, + 49, + 54, + 58, + 58, + 77, + 73, + 78, + 41 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ], + [ + 3, + { + "Memory": { + "bytes": [ + 117, + 110, + 115, + 97, + 102, + 101, + 32, + 112, + 114, + 101, + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 40, + 115, + 41, + 32, + 118, + 105, + 111, + 108, + 97, + 116, + 101, + 100, + 58, + 32, + 105, + 49, + 54, + 58, + 58, + 117, + 110, + 99, + 104, + 101, + 99, + 107, + 101, + 100, + 95, + 115, + 117, + 98, + 32, + 99, + 97, + 110, + 110, + 111, + 116, + 32, + 111, + 118, + 101, + 114, + 102, + 108, + 111, + 119 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Not" + } + } + ] + ], + "functions": [ + [ + 20, + { + "IntrinsicSym": "black_box" + } + ], + [ + 13, + { + "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE" + } + ], + [ + 14, + { + "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE" + } + ], + [ + 24, + { + "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" + } + ], + [ + 36, + { + "NoOpSym": "" + } + ], + [ + 28, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE" + } + ], + [ + 0, + { + "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" + } + ], + [ + 33, + { + "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" + } + ], + [ + 34, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E" + } + ], + [ + 32, + { + "NormalSym": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E" + } + ], + [ + 19, + { + "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE" + } + ], + [ + 30, + { + "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E" + } + ], + [ + 22, + { + "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E" + } + ] + ], + "uneval_consts": [], + "items": [ + { + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>::{closure#0}", + "id": 1, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + }, + "span": 16 + }, + { + "kind": { + "StorageLive": 3 + }, + "span": 15 + }, + { + "kind": { + "StorageLive": 4 + }, + "span": 17 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + } + } + ] + }, + "span": 17 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 14, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 13, + "id": 1 + } + } + }, + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 15 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 4 + }, + "span": 19 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 18, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 14, + "id": 2 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 16 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 21 + }, + { + "kind": { + "StorageLive": 5 + }, + "span": 22 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + } + ] + } + ] + } + ] + }, + "span": 22 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 15 + ] + }, + { + "Field": [ + 0, + 9 + ] + } + ] + } + } + } + ] + }, + "span": 23 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 6, + "projection": [] + } + }, + 16 + ] + } + ] + }, + "span": 24 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 25 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 26 + }, + { + "kind": { + "StorageDead": 2 + }, + "span": 27 + } + ], + "terminator": { + "kind": "Return", + "span": 20 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 28, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 3, + "mutability": "Mut" + }, + { + "ty": 17, + "span": 16, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 15, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 17, + "mutability": "Mut" + }, + { + "ty": 18, + "span": 22, + "mutability": "Mut" + }, + { + "ty": 9, + "span": 23, + "mutability": "Mut" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 7 + ] + } + ] + } + }, + "argument_index": null + }, + { + "name": "self", + "source_info": { + "span": 29, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "self", + "source_info": { + "span": 30, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 3 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_sub4main17h289393681834f0fcE", + "mono_item_kind": { + "MonoItemFn": { + "name": "main", + "id": 8, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 78, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 42, + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 13 + } + } + } + } + ] + }, + "span": 78 + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 79, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 213, + 255 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 14 + } + } + } + } + ] + }, + "span": 79 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 76, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 32, + "id": 12 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 77 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 80 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 80 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 80 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Constant": { + "span": 82, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 255, + 127 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 15 + } + } + } + ] + } + ] + }, + "span": 81 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 3 + } + } + }, + "span": 81 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 83 + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + }, + "span": 83 + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 83 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 8, + "projection": [] + } + }, + { + "Constant": { + "span": 85, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 128 + ], + "provenance": { + "ptrs": [] + }, + "align": 2, + "mutability": "Mut" + } + }, + "ty": 23, + "id": 16 + } + } + } + ] + } + ] + }, + "span": 84 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 6 + ] + ], + "otherwise": 5 + } + } + }, + "span": 84 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 86 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 87, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 33, + "id": 17 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 58, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 18 + } + } + } + ], + "destination": { + "local": 10, + "projection": [] + }, + "target": null, + "unwind": "Continue" + } + }, + "span": 87 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 88, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 89, + "mutability": "Not" + }, + { + "ty": 23, + "span": 90, + "mutability": "Not" + }, + { + "ty": 23, + "span": 91, + "mutability": "Not" + }, + { + "ty": 21, + "span": 81, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 80, + "mutability": "Mut" + }, + { + "ty": 21, + "span": 84, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 27, + "span": 83, + "mutability": "Mut" + }, + { + "ty": 26, + "span": 87, + "mutability": "Mut" + } + ], + "arg_count": 0, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 89, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 90, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "result", + "source_info": { + "span": 91, + "scope": 3 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 92 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 28, + "id": 9 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub::precondition_check", + "id": 4, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 4 + }, + "span": 55 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 56 + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 0, + 23 + ] + } + ] + } + } + } + ] + }, + "span": 57 + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 6, + "projection": [ + { + "Field": [ + 1, + 21 + ] + } + ] + } + } + } + ] + }, + "span": 58 + }, + { + "kind": { + "StorageDead": 6 + }, + "span": 59 + }, + { + "kind": { + "StorageDead": 4 + }, + "span": 55 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 54 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 60, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 24, + "id": 7 + } + } + }, + "args": [ + { + "Constant": { + "span": 61, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 67, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + }, + "align": 8, + "mutability": "Mut" + } + }, + "ty": 25, + "id": 8 + } + } + } + ], + "destination": { + "local": 3, + "projection": [] + }, + "target": null, + "unwind": "Unreachable" + } + }, + "span": 62 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 63 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 64, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 23, + "span": 65, + "mutability": "Not" + }, + { + "ty": 26, + "span": 62, + "mutability": "Not" + }, + { + "ty": 23, + "span": 57, + "mutability": "Not" + }, + { + "ty": 21, + "span": 58, + "mutability": "Not" + }, + { + "ty": 27, + "span": 56, + "mutability": "Mut" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "lhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 65, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "self", + "source_info": { + "span": 66, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 67, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "a", + "source_info": { + "span": 57, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "b", + "source_info": { + "span": 58, + "scope": 2 + }, + "composite": null, + "value": { + "Place": { + "local": 5, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 68 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + }, + "span": 69 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 69, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 30, + "id": 10 + } + } + }, + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 16, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 12, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + }, + { + "ty": 31, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE", + "mono_item_kind": { + "MonoItemFn": { + "name": "<() as std::process::Termination>::report", + "id": 7, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "span": 72, + "user_ty": null, + "const_": { + "kind": { + "Allocated": { + "bytes": [ + 0 + ], + "provenance": { + "ptrs": [] + }, + "align": 1, + "mutability": "Mut" + } + }, + "ty": 17, + "id": 11 + } + } + } + } + ] + }, + "span": 72 + } + ], + "terminator": { + "kind": "Return", + "span": 71 + } + } + ], + "locals": [ + { + "ty": 17, + "span": 73, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 74, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 74, + "scope": 0 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 75 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", + "id": 6, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 70 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 70, + "mutability": "Mut" + }, + { + "ty": 29, + "span": 70, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [], + "spread_arg": null, + "span": 70 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std2rt10lang_start17h233dfbd9029fc4f7E", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::rt::lang_start::<()>", + "id": 0, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 5 + }, + "span": 1 + }, + { + "kind": { + "StorageLive": 6 + }, + "span": 2 + }, + { + "kind": { + "StorageLive": 8 + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 1, + [ + { + "Type": 1 + }, + { + "Type": 2 + }, + { + "Type": 3 + }, + { + "Type": 4 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + }, + "span": 3 + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 8, + "projection": [] + } + ] + } + ] + }, + "span": 2 + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 7, + "projection": [] + } + }, + 5 + ] + } + ] + }, + "span": 2 + } + ], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 0, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 0, + "id": 0 + } + } + }, + "args": [ + { + "Move": { + "local": 6, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 1 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 6 + }, + "span": 5 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 0 + }, + { + "Field": [ + 0, + 6 + ] + } + ] + } + } + } + ] + }, + "span": 6 + }, + { + "kind": { + "StorageDead": 8 + }, + "span": 7 + }, + { + "kind": { + "StorageDead": 5 + }, + "span": 7 + } + ], + "terminator": { + "kind": "Return", + "span": 4 + } + } + ], + "locals": [ + { + "ty": 6, + "span": 8, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 9, + "mutability": "Not" + }, + { + "ty": 6, + "span": 10, + "mutability": "Not" + }, + { + "ty": 8, + "span": 11, + "mutability": "Not" + }, + { + "ty": 9, + "span": 12, + "mutability": "Not" + }, + { + "ty": 10, + "span": 1, + "mutability": "Mut" + }, + { + "ty": 5, + "span": 2, + "mutability": "Mut" + }, + { + "ty": 11, + "span": 2, + "mutability": "Not" + }, + { + "ty": 12, + "span": 3, + "mutability": "Not" + } + ], + "arg_count": 4, + "var_debug_info": [ + { + "name": "main", + "source_info": { + "span": 9, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "argc", + "source_info": { + "span": 10, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "argv", + "source_info": { + "span": 11, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 3, + "projection": [] + } + }, + "argument_index": 3 + }, + { + "name": "sigpipe", + "source_info": { + "span": 12, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 4, + "projection": [] + } + }, + "argument_index": 4 + }, + { + "name": "v", + "source_info": { + "span": 6, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 13 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E", + "mono_item_kind": { + "MonoItemFn": { + "name": "core::num::::unchecked_sub", + "id": 3, + "body": { + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 3 + }, + "span": 43 + }, + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "NullaryOp": [ + "UbChecks", + 21 + ] + } + ] + }, + "span": 44 + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + }, + "span": 43 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 45, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 22, + "id": 6 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 46 + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + }, + "span": 48 + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + }, + "span": 49 + } + ], + "terminator": { + "kind": "Return", + "span": 47 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 50, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 51, + "mutability": "Not" + }, + { + "ty": 23, + "span": 52, + "mutability": "Not" + }, + { + "ty": 21, + "span": 43, + "mutability": "Mut" + }, + { + "ty": 1, + "span": 46, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "self", + "source_info": { + "span": 51, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "rhs", + "source_info": { + "span": 52, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + } + ], + "spread_arg": null, + "span": 53 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE", + "mono_item_kind": { + "MonoItemFn": { + "name": "std::sys::backtrace::__rust_begin_short_backtrace::", + "id": 2, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 31, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 19, + "id": 3 + } + } + }, + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 33 + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 34, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 20, + "id": 5 + } + } + }, + "args": [ + { + "Constant": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "target": 2, + "unwind": "Unreachable" + } + }, + "span": 35 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 36 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 37, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 38, + "mutability": "Not" + }, + { + "ty": 1, + "span": 39, + "mutability": "Not" + } + ], + "arg_count": 1, + "var_debug_info": [ + { + "name": "f", + "source_info": { + "span": 38, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "result", + "source_info": { + "span": 40, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + }, + { + "name": "dummy", + "source_info": { + "span": 41, + "scope": 2 + }, + "composite": null, + "value": { + "Const": { + "span": 32, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 1, + "id": 4 + } + } + }, + "argument_index": 1 + } + ], + "spread_arg": null, + "span": 42 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE", + "mono_item_kind": { + "MonoItemFn": { + "name": ">::call_once", + "id": 5, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 69 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 69 + } + } + ], + "locals": [ + { + "ty": 1, + "span": 69, + "mutability": "Mut" + }, + { + "ty": 7, + "span": 69, + "mutability": "Not" + }, + { + "ty": 1, + "span": 69, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [], + "spread_arg": 2, + "span": 69 + } + } + }, + "details": null + }, + { + "symbol_name": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E", + "mono_item_kind": { + "MonoItemFn": { + "name": "unchecked_op", + "id": 9, + "body": { + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "func": { + "Constant": { + "span": 93, + "user_ty": null, + "const_": { + "kind": "ZeroSized", + "ty": 34, + "id": 19 + } + } + }, + "args": [ + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "target": 1, + "unwind": "Continue" + } + }, + "span": 94 + } + }, + { + "statements": [], + "terminator": { + "kind": "Return", + "span": 95 + } + } + ], + "locals": [ + { + "ty": 23, + "span": 96, + "mutability": "Mut" + }, + { + "ty": 23, + "span": 97, + "mutability": "Not" + }, + { + "ty": 23, + "span": 98, + "mutability": "Not" + } + ], + "arg_count": 2, + "var_debug_info": [ + { + "name": "a", + "source_info": { + "span": 97, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 1, + "projection": [] + } + }, + "argument_index": 1 + }, + { + "name": "b", + "source_info": { + "span": 98, + "scope": 0 + }, + "composite": null, + "value": { + "Place": { + "local": 2, + "projection": [] + } + }, + "argument_index": 2 + }, + { + "name": "unchecked_sum", + "source_info": { + "span": 99, + "scope": 1 + }, + "composite": null, + "value": { + "Place": { + "local": 0, + "projection": [] + } + }, + "argument_index": null + } + ], + "spread_arg": null, + "span": 100 + } + } + }, + "details": null + } + ], + "types": [ + [ + 21, + { + "RigidTy": "Bool" + } + ], + [ + 6, + { + "RigidTy": { + "Int": "Isize" + } + } + ], + [ + 2, + { + "RigidTy": { + "Int": "I8" + } + } + ], + [ + 16, + { + "RigidTy": { + "Int": "I32" + } + } + ], + [ + 23, + { + "RigidTy": { + "Int": "I16" + } + } + ], + [ + 9, + { + "RigidTy": { + "Uint": "U8" + } + } + ] + ], + "debug": null +} From 906c4df2c5a879fbf8ca9d07fce3d75118ce045c Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 17:17:31 -0600 Subject: [PATCH 44/84] Image name never got set as output for job --- .github/workflows/container-test.yml | 8 +- .github/workflows/release.yml | 4 +- rust-verification-proofs/README.md | 95 - .../maximum-proof/README.md | 98 - .../maximum-proof/main-max-with-lt.rs | 18 - .../maximum-proof/main-max-with-lt.smir.dot | 135 - .../maximum-proof/main-max-with-lt.smir.json | 2676 --------------- .../maximum-proof/maximum-spec.k | 73 - .../unchecked_add/unchecked-add.rs | 14 - .../unchecked_add/unchecked-add.smir.dot | 140 - .../unchecked_add/unchecked-add.smir.json | 2969 ----------------- .../unchecked_add/unchecked-op-spec.k | 75 - .../unchecked_mul/unchecked-mul.rs | 14 - .../unchecked_mul/unchecked-mul.smir.dot | 140 - .../unchecked_mul/unchecked-mul.smir.json | 2969 ----------------- .../unchecked_mul/unchecked-op-spec.k | 73 - .../unchecked_neg/unchecked-neg.rs | 12 - .../unchecked_neg/unchecked-neg.smir.dot | 137 - .../unchecked_neg/unchecked-neg.smir.json | 2339 ------------- .../unchecked_neg/unchecked-op-spec.k | 71 - .../unchecked_shl/unchecked-op-spec.k | 73 - .../unchecked_shl/unchecked-shl.rs | 13 - .../unchecked_shl/unchecked-shl.smir.dot | 127 - .../unchecked_shl/unchecked-shl.smir.json | 2353 ------------- .../unchecked_shr/unchecked-op-spec.k | 73 - .../unchecked_shr/unchecked-shr.rs | 13 - .../unchecked_shr/unchecked-shr.smir.dot | 127 - .../unchecked_shr/unchecked-shr.smir.json | 2353 ------------- .../unchecked_sub/unchecked-op-spec.k | 73 - .../unchecked_sub/unchecked-sub.rs | 14 - .../unchecked_sub/unchecked-sub.smir.dot | 140 - .../unchecked_sub/unchecked-sub.smir.json | 2969 ----------------- 32 files changed, 7 insertions(+), 20381 deletions(-) delete mode 100644 rust-verification-proofs/README.md delete mode 100644 rust-verification-proofs/maximum-proof/README.md delete mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.rs delete mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot delete mode 100644 rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json delete mode 100644 rust-verification-proofs/maximum-proof/maximum-spec.k delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.rs delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.dot delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-add.smir.json delete mode 100644 rust-verification-proofs/unchecked_add/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.rs delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json delete mode 100644 rust-verification-proofs/unchecked_mul/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.rs delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json delete mode 100644 rust-verification-proofs/unchecked_neg/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.rs delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot delete mode 100644 rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.rs delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot delete mode 100644 rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-op-spec.k delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.rs delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot delete mode 100644 rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 33a54986f..4542b302b 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -11,10 +11,10 @@ jobs: publish-test-image: runs-on: ubuntu-latest outputs: - container-image: ${{ steps.set-image-name .outputs.container-image }} - k-version: ${{ steps.set-image-name .outputs.k-version }} - kmir-version: ${{ steps.set-image-name .outputs.kmir-version }} - short-sha: ${{ steps.set-image-name .outputs.short-sha }} + image-name: ${{ steps.set-image-name.outputs.image-name }} + k-version: ${{ steps.set-image-name.outputs.k-version }} + kmir-version: ${{ steps.set-image-name.outputs.kmir-version }} + short-sha: ${{ steps.set-image-name.outputs.short-sha }} steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b8ae2b43..3fc62d6d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: id: set-image-name run: | echo "image-name=runtimeverificationinc/kmir" >> $GITHUB_OUTPUT - echo "k-version=${K_VERSION}" >> $GITHUB_OUTPUT + echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Build Kmir Container @@ -36,5 +36,7 @@ jobs: file: Dockerfile.kmir platforms: linux/amd64 push: true + build-args: | + K_VERSION=${{ steps.set-image-name.outputs.k-version }} tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }} \ No newline at end of file diff --git a/rust-verification-proofs/README.md b/rust-verification-proofs/README.md deleted file mode 100644 index 25ed9b099..000000000 --- a/rust-verification-proofs/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Formal Rust Code Verification Using KMIR - -This subrepository contains a collection of programs and specifications that aim to illustrate how KMIR can be used to validate the properties of Rust programs and the Rust language itself. The code made available in this repository was developed taking as references the challenges present on the [Verify Rust Standard Library Effort](https://model-checking.github.io/verify-rust-std/intro.html). - -## Table of Contents - - -- [Project Setup](#project-setup) -- [Proof 1: Proving a Maximum Finding Function That only Uses `lower-than (<)`](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) -- [Proof 2: Proving Unsafe Arithmetic Operations](#proof-2-proving-unsafe-arithmetic-operations) - -## Project Setup - -In order to run and explore the proofs elaborated here, make sure that KMIR can be locally executed in your machine following the instructions available in [this repository's README file](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs). - -[Be sure to have Rust installed](https://www.rust-lang.org/tools/install) in your machine, have the specific components and toolchain necessary to run KMIR. To guarantee it, with `rustup` installed, run the following commands: - -```bash -rustup component add rust-src rustc-dev llvm-tools-preview -rustup toolchain install nightly-2024-11-29 -rustup default nightly-2024-11-29 -``` - -**(Optional)** Additionally, if you would like to build your own code specifications to be proven with KMIR, install the [Rust Stable MIR Pretty Printing](https://github.com/runtimeverification/stable-mir-json/tree/20820cc6abd8fd22769931a3f8754ee35ab24c05) tool. It won't be necessary to install it if you'd like to understand how KMIR works and to execute its proofs, but it is needed currently to help us traverse program states, as seen in the [steps needed to achieve Proof 1's specification](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). To install the Rust Stable MIR Pretty Printing tool, in the root of this project, run: - -```bash -git submodule update --init --recursive -make stable-mir-json -``` - -The usage of this tool will be abstracted in the future, removing the need to construct claims manually. - -## Proof 1: Proving a Maximum Finding Function That only Uses `lower-than` - -Considering a function that receives three integer arguments, this function should return the highest value among them. Assertions can be used to enforce this condition, and an example code that tests this function can be seen below: - -```Rust -fn main() { - - let a:usize = 42; - let b:usize = -43; - let c:usize = 0; - - let result = maximum(a, b, c); - - assert!(result >= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: usize, b: usize, c: usize) -> usize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} -``` - -Notice in this case that `a`, `b`, and `c` are concrete, fixed values. To turn the parameters of `maximum` into symbolic variables, we can obtain the representation of the function call to `maximum` executed using KMIR and then replace the concrete values of these variables with symbolic values. Furthermore, the assertion specified in the code can be manually translated as a requirement that should be met by the symbolic variables, meaning that any value that they can assume must respect the conditions contained in the specification. Following this approach, we can utilize KMIR to give us formal proof that, for any valid `isize` input, the maximum value among the three parameters will be returned. - -Information on how the specification was created can be found in the longer [description of `maximum-proof`](https://github.com/runtimeverification/mir-semantics/tree/sample-challenge-11-proofs/rust-verification-proofs/maximum-proof). - -To run this proof in your terminal from this folder, execute: - -```Bash -cd maximum-proof -poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof -``` - -## Proof 2: Proving Unsafe Arithmetic Operations - -The proofs in this section concern a section of the challenge of securing [Safety of Methods for Numeric Primitive Types](https://model-checking.github.io/verify-rust-std/challenges/0011-floats-ints.html#challenge-11-safety-of-methods-for-numeric-primitive-types) of the Verify Rust Standard Library Effort. Here, we implement proof of concepts of how KMIR can be used to prove the following unsafe methods according to their undefined behaviors: `unchecked_add`, `unchecked_sub`, `unchecked_mul`, `unchecked_shl`, `unchecked_shr`, and `unchecked_neg`. - -For these functions, the proofs were carried out using variables of the `i16` integer type, and the criteria for triggering undefined behaviors for these methods were obtained in the [i16 type documentation page](https://doc.rust-lang.org/std/primitive.i16.html). - -To obtain the specifications that prove the presence/absence of undefined behavior for these functions, analogous processes to the ones discussed in [Proof 1](#proof-1-proving-a-maximum-finding-function-that-only-uses-lower-than) were performed. - -For an illustration of how we specify the requirements of the proof, which, in this case, are the assertions that would help us detect the presence/absence of undefined behavior in the unsafe methods, let's explore how we can prove safety conditions for the `unchecked_add` operation. Consider the following function: - -https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-add.rs#L11-L14 - -`unchecked_op` is a function that receives two `i16` arguments and executes an `unchecked_add` of the first parameter by the second, returning an `i16` value resulting from this operation. According to the [documentation of the unchecked_add function for the i16 primitive type](https://doc.rust-lang.org/std/primitive.i16.html#method.unchecked_add), considering the safety of this function "This results in undefined behavior when `self + rhs > i16::MAX or self + rhs < i16::MIN`, i.e. when `checked_add` would return `None`". By the process further disclosed in Proof 1, we can obtain a valid representation of a function call for `unchecked_op` and modify the variable values to be symbolic. The next step is to define the conditions these values should meet to verify safety conditions elaborated for `unchecked_add`. To this goal, see the following code snippet: - -https://github.com/runtimeverification/mir-semantics/blob/e2de329d009cde25f505819d7c8c9815571db9e7/rust-verification-proofs/unchecked_add/unchecked-op-spec.k#L66-L73 - -The parameters for `unchecked_add` in this specification for KMIR are represented as A and B, which now are symbolic values. To specify the goal of our verification process, we implemented the above code snippet into the specification, which adds a requirement to the execution of our symbolic execution engine. In other words, our proof will only be successful if the specified requirements above are respected. - -In this `requires` clause, first, we use the semantics of K to specify A and B's boundaries, as `i16`s: `0 -Int (1 <= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: usize, b: usize, c: usize) -> usize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} -``` - -We want to prove a property of `maximum`: -- When called with `a`, `b`, and `c`, -- the `result` will be greater or equal all of the arguments, -- and equal to one (or more) of them. - -The `main` program above states this using some concrete values of `a`, `b`, and `c`. We will run this program to construct a general symbolic claim and prove it. - -In a future version, we will be able to start directly with the `maximum` function call and provide symbolic arguments to it. This will save some manual work setting up the claim file and fits the target of proving based on property tests. - -## Extracting Stable MIR for the program - -Before we can run the program using the MIR semantics, we have to compile it with a special compiler to extract Stable MIR from it. This step differs a bit depending on whether the program has multiple crates, in our case it is just a simple `rustc` invocation. This creates `main-max-with-lt.smir.json`. (Run the below commmands from the `mir-semantics/rust-verification-proofs/maximum-proof/` directory). - -```shell -cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs -``` -The Stable MIR for the program can also be rendered as a graph, using the `--dot` option. This creates `main-max-with-lt.smir.dot`. - -```shell -cargo -Z unstable-options -C ../../deps/stable-mir-json/ run -- --dot -Zno-codegen --out-dir $PWD $PWD/main-max-with-lt.rs -``` -## Constructing the claim by executing `main` to certain points -Through concrete execution of the parsed K program we can interrupt the execution after a given number of rewrite steps to inspect the intermediate state. This will help us with writing our claim manually until the process is automated. - -1. The program (`main`) reaches the call to `maximum` after 22 steps. - The following command runs it and displays the resulting program state. - - ```shell - poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 22 | less -S - ``` - - Arguments `a`, `b`, and `c` are initialised to `Integer`s as `locals[1]` to `locals[3]` - - A `call` terminator calling function `ty(25)` is executed next (front of the `k` cell) - - The function table contains `ty(25) -> "maximum" code. - - Other state (how `main` continues, its other local variables, and some internal functions) is relevant to the proof we want to perform. -2. The program executes for a total of 92 steps to reach the point where it `return`s from `maximum`. - The following command runs it and displays the resulting program state. - - ```shell - poetry -C ../../kmir/ run -- kmir run $PWD/main-max-with-lt.smir.json --depth 92 | less -S - ``` - - The value `locals[0]` is now set to an `Integer`. This will be the target of our assertions. - - A `return` terminator is executed next (front of the `k` cell), it will return `locals[0]` - - It should be an `Integer` with the desired properties as stated above - -State 1. defines our start state for the claim. Irrelevant parts are elided (replaced by variables). -* The code of the `maximum` function in the `functions` table needs to be kept. We also keep its identifier `ty(25)`. Other functions can be removed (we won't perform a return). -* The `call` terminator is kept, calling `ty(25)` with arguments from `locals[1,2,3]`. `target` is modified to be `noBasicBlockIdx` to force termination of the prover (no block to jump back to). -* The four locals `0` - `3` are required in their original order to provide the function arguments. The values of `a`, `b`, and `c` in locals `1` - `3` are replaced with symbolic variables used in the proof. -* We could keep all other locals but do not have to (however it is important that the list of locals has a known length). -* `main`s other details in `currentFrame` are irrelevant and elided. - - -State 2. is the end state, where all that matters is the returned value. - -* The `locals` list should contain this `?RESULT` value at index `0` -* The `?RESULT` value should have the properties stated (equivalent to the assertion in `main`) -* Because of the modified `target`, the program should end, i.e., have an `#EndProgram` in the `k` cell. - -The above is written as a _claim_ in K framework language into a `maximum-spec.k` file. -Most of the syntax can be copied from the output of the `kmir run` commands above, and irrelevant parts replaced by `_` (LHS) or `?_` (RHS). - -Alternatively, it is possible to construct a claim that the entire rest of the program after initialising the variables will result in the desired `?RESULT`, i.e., the assertion in `main` is executed successfully and the program ends in `#EndProgram` after checking it. This would require more steps. - -## Running the prover on the claim and viewing the proof -Now that we have constructed claim, we can run use the KMIR verifier to perform symbollic execution, and can view the state of proof through the KMIR proof viewer. -```shell -poetry -C ../../kmir/ run -- kmir prove run $PWD/maximum-spec.k --proof-dir $PWD/proof -``` - -The proof steps are saved in the `$PWD/proof` directory for later inspection using `kmir prove view`. This is especially important when the proof does _not_ succeed immediately. - -```shell -poetry -C ../../kmir/ run -- kmir prove view MAXIMUM-SPEC.maximum-spec --proof-dir $PWD/proof -``` diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs b/rust-verification-proofs/maximum-proof/main-max-with-lt.rs deleted file mode 100644 index 448c2cb9d..000000000 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.rs +++ /dev/null @@ -1,18 +0,0 @@ - -fn main() { - - let a:usize = 42; - let b:usize = 22; - let c:usize = 0; - - let result = maximum(a, b, c); - - assert!(result >= a && result >= b && result >= c - && (result == a || result == b || result == c ) ); -} - -fn maximum(a: usize, b: usize, c: usize) -> usize { - // max(a, max(b, c)) - let max_ab = if a < b {b} else {a}; - if max_ab < c {c} else {max_ab} -} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot deleted file mode 100644 index 6da5f7ff3..000000000 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.dot +++ /dev/null @@ -1,135 +0,0 @@ -digraph { - label="main_max_with_lt"; - node [shape=rectangle]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - Xac08878333d72e42_0 [label="_ZN4core9panicking5panic1\n7h941160ead03e2d54E", color=red]; - Xc987e5ecea6cc82b_0 [label="_ZN3std2rt19lang_start_in\nternal17h018b8394ba015d86\nE", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - subgraph cluster_0 { - label="main"; - style="filled"; - color=palegreen; - X37252ea5c5b3ce2a_0 -> X37252ea5c5b3ce2a_1 [label="4"]; - X37252ea5c5b3ce2a_0 [label="1 <- Use(const :: usize)\l2 <- Use(const :: usize)\l3 <- Use(const :: usize)\lCall\l"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_1 -> X37252ea5c5b3ce2a_2 [label="other"]; - X37252ea5c5b3ce2a_1 [label="5 <- Ge(cp(4), cp(1))\lSwitchInt mv(5)\l"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_2 -> X37252ea5c5b3ce2a_3 [label="other"]; - X37252ea5c5b3ce2a_2 [label="6 <- Ge(cp(4), cp(2))\lSwitchInt mv(6)\l"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_3 -> X37252ea5c5b3ce2a_4 [label="other"]; - X37252ea5c5b3ce2a_3 [label="7 <- Ge(cp(4), cp(3))\lSwitchInt mv(7)\l"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_5 [label="0"]; - X37252ea5c5b3ce2a_4 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_4 [label="8 <- Eq(cp(4), cp(1))\lSwitchInt mv(8)\l"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_6 [label="0"]; - X37252ea5c5b3ce2a_5 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_5 [label="9 <- Eq(cp(4), cp(2))\lSwitchInt mv(9)\l"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_7 [label="0"]; - X37252ea5c5b3ce2a_6 -> X37252ea5c5b3ce2a_8 [label="other"]; - X37252ea5c5b3ce2a_6 [label="10 <- Eq(cp(4), cp(3))\lSwitchInt mv(10)\l"]; - X37252ea5c5b3ce2a_7 [label="Call\l"]; - X37252ea5c5b3ce2a_8 [label="Return\l"]; - } - X37252ea5c5b3ce2a_0 -> X9585eeb1b7d3a83d_0 [label="cp(1),cp(2),cp(3)"]; - X37252ea5c5b3ce2a_7 -> Xac08878333d72e42_0 [label="const :: &str"]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X5c233e009f84aa6c_0 [label="0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X83f8b52e3f0ef4c5_0 -> X83f8b52e3f0ef4c5_1 [label="0"]; - X83f8b52e3f0ef4c5_0 [label="Call\l"]; - X83f8b52e3f0ef4c5_1 -> X83f8b52e3f0ef4c5_2 [label="2"]; - X83f8b52e3f0ef4c5_1 [label="Call\l"]; - X83f8b52e3f0ef4c5_2 [label="Return\l"]; - } - X83f8b52e3f0ef4c5_0 -> X5153bc83e282e268_0 [label="mv(1),const :: ()"]; - X83f8b52e3f0ef4c5_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_3 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X88af70ac7219a434_0 -> X88af70ac7219a434_1 [label="5"]; - X88af70ac7219a434_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l8 <- Closure (cp(1))\l7 <- & 8\l6 <- Cast-PointerCoercion(Unsize) cp(7)\lCall\l"]; - X88af70ac7219a434_1 [label="Storage Dead _6\l0 <- Use(cp(5 as VariantIdx(0).0))\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X88af70ac7219a434_0 -> Xc987e5ecea6cc82b_0 [label="mv(6),mv(2),mv(3),mv(4)"]; - subgraph cluster_4 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X2aeea2bef42114da_0 -> X2aeea2bef42114da_1 [label="0"]; - X2aeea2bef42114da_0 [label="Call\l"]; - X2aeea2bef42114da_1 [label="Return\l"]; - } - X2aeea2bef42114da_0 -> X58ae416f9afa06ac_0 [label="mv(*1),mv(2)"]; - subgraph cluster_5 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X5153bc83e282e268_0 -> X5153bc83e282e268_1 [label="0"]; - X5153bc83e282e268_0 [label="Call\l"]; - X5153bc83e282e268_1 [label="Return\l"]; - } - X5153bc83e282e268_0 -> X5153bc83e282e268_0: 1 [label=""]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - Xf1c2e3e2362b71b1_0 -> Xf1c2e3e2362b71b1_1 [label="3"]; - Xf1c2e3e2362b71b1_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l4 <- Use(cp(*1.0))\lCall\l"]; - Xf1c2e3e2362b71b1_1 -> Xf1c2e3e2362b71b1_2 [label="2"]; - Xf1c2e3e2362b71b1_1 [label="Storage Dead _4\lCall\l"]; - Xf1c2e3e2362b71b1_2 [label="Storage Dead _3\lStorage Live _5\l5 <- & 2.0\lStorage Live _6\l6 <- Use(cp(2.0.0))\l0 <- Cast-IntToInt mv(6)\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - Xf1c2e3e2362b71b1_0 -> X83f8b52e3f0ef4c5_0 [label="mv(4)"]; - Xf1c2e3e2362b71b1_1 -> X5c233e009f84aa6c_0 [label="mv(3)"]; - subgraph cluster_7 { - label="maximum"; - style="filled"; - color=palegreen; - X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_2 [label="0"]; - X9585eeb1b7d3a83d_0 -> X9585eeb1b7d3a83d_1 [label="other"]; - X9585eeb1b7d3a83d_0 [label="5 <- Lt(cp(1), cp(2))\lSwitchInt mv(5)\l"]; - X9585eeb1b7d3a83d_1 -> X9585eeb1b7d3a83d_3; - X9585eeb1b7d3a83d_1 [label="4 <- Use(cp(2))\lGoto\l"]; - X9585eeb1b7d3a83d_2 -> X9585eeb1b7d3a83d_3; - X9585eeb1b7d3a83d_2 [label="4 <- Use(cp(1))\lGoto\l"]; - X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_5 [label="0"]; - X9585eeb1b7d3a83d_3 -> X9585eeb1b7d3a83d_4 [label="other"]; - X9585eeb1b7d3a83d_3 [label="7 <- Use(cp(4))\l6 <- Lt(mv(7), cp(3))\lSwitchInt mv(6)\l"]; - X9585eeb1b7d3a83d_4 -> X9585eeb1b7d3a83d_6; - X9585eeb1b7d3a83d_4 [label="0 <- Use(cp(3))\lGoto\l"]; - X9585eeb1b7d3a83d_5 -> X9585eeb1b7d3a83d_6; - X9585eeb1b7d3a83d_5 [label="0 <- Use(cp(4))\lGoto\l"]; - X9585eeb1b7d3a83d_6 [label="Return\l"]; - } - subgraph cluster_8 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_3 [label="Cleanup"]; - X58ae416f9afa06ac_0 -> X58ae416f9afa06ac_1 [label="0"]; - X58ae416f9afa06ac_0 [label="3 <- &mut 1\lCall\l"]; - X58ae416f9afa06ac_1 -> X58ae416f9afa06ac_2; - X58ae416f9afa06ac_1 [label="Drop 1\l"]; - X58ae416f9afa06ac_2 [label="Return\l"]; - X58ae416f9afa06ac_3 -> X58ae416f9afa06ac_4; - X58ae416f9afa06ac_3 [label="Drop 1\l"]; - X58ae416f9afa06ac_4 [label="Resume\l"]; - } - X58ae416f9afa06ac_0 -> Xf1c2e3e2362b71b1_0 [label="mv(3),mv(2)"]; - subgraph cluster_9 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xefb68cd7a0d5be14_0 [label="Return\l"]; - } -} diff --git a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json b/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json deleted file mode 100644 index 02182bb8e..000000000 --- a/rust-verification-proofs/maximum-proof/main-max-with-lt.smir.json +++ /dev/null @@ -1,2676 +0,0 @@ -{ - "name": "main_max_with_lt", - "crate_id": 5373935543796547206, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 97, - 32, - 38, - 38, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 98, - 32, - 38, - 38, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 62, - 61, - 32, - 99, - 32, - 38, - 38, - 10, - 32, - 32, - 32, - 32, - 40, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 97, - 32, - 124, - 124, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 98, - 32, - 124, - 124, - 32, - 114, - 101, - 115, - 117, - 108, - 116, - 32, - 61, - 61, - 32, - 99, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E" - } - ], - [ - 23, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h018b8394ba015d86E" - } - ], - [ - 21, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 25, - { - "NormalSym": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E" - } - ], - [ - 27, - { - "NormalSym": "_ZN4core9panicking5panic17h941160ead03e2d54E" - } - ], - [ - 33, - { - "NoOpSym": "" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb1d17c99442a8691E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h68df99d5221b15e2E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h8f98b99a20edb596E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN16main_max_with_lt7maximum17h5e37abb753494251E", - "mono_item_kind": { - "MonoItemFn": { - "name": "maximum", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 69 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [] - } - } - } - ] - }, - "span": 71 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } - }, - "span": 70 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 3 - } - }, - "span": 70 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 7, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 73 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 4 - } - } - }, - "span": 73 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "span": 76 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 75 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "span": 77 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 75 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 - } - } - ], - "locals": [ - { - "ty": 26, - "span": 79, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 80, - "mutability": "Not" - }, - { - "ty": 26, - "span": 81, - "mutability": "Not" - }, - { - "ty": 26, - "span": 82, - "mutability": "Not" - }, - { - "ty": 26, - "span": 83, - "mutability": "Not" - }, - { - "ty": 29, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 74, - "mutability": "Mut" - } - ], - "arg_count": 3, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "c", - "source_info": { - "span": 82, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "max_ab", - "source_info": { - "span": 83, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 84 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h35ef4f3d7035a7c0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 23, - "id": 7 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - }, - { - "ty": 24, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN16main_max_with_lt4main17h96bac61ef98236a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 10 - } - } - } - } - ] - }, - "span": 52 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 53, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 22, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } - } - } - } - ] - }, - "span": 53 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 54, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 12 - } - } - } - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 50, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 9 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 2 - } - } - }, - "span": 55 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 3 - } - } - }, - "span": 56 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Ge", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 4 - } - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 58 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 8, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 8 - } - } - }, - "span": 58 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 9, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 8 - } - } - }, - "span": 59 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 4, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 60 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 10, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 7 - ] - ], - "otherwise": 8 - } - } - }, - "span": 60 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 27, - "id": 13 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 110, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 28, - "id": 14 - } - } - } - ], - "destination": { - "local": 11, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 61 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 62 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 63, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 64, - "mutability": "Not" - }, - { - "ty": 26, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 66, - "mutability": "Not" - }, - { - "ty": 26, - "span": 67, - "mutability": "Not" - }, - { - "ty": 29, - "span": 55, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 56, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 57, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 59, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 60, - "mutability": "Mut" - }, - { - "ty": 30, - "span": 61, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 64, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 65, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "c", - "source_info": { - "span": 66, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 67, - "scope": 4 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h3491d8bffa495004E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hd99c80c4d0898bdeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 4, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 44, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 44 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h739869090782dad0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 43, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 21, - "id": 6 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 22, - "span": 43, - "mutability": "Not" - }, - { - "ty": 1, - "span": 43, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 43 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hf5d9ff8f37d5cc66E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 46, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 8 - } - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 47, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 48, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 48, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 49 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 29, - { - "RigidTy": "Bool" - } - ], - [ - 26, - { - "RigidTy": { - "Uint": "Usize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/maximum-proof/maximum-spec.k b/rust-verification-proofs/maximum-proof/maximum-spec.k deleted file mode 100644 index ee506eb8f..000000000 --- a/rust-verification-proofs/maximum-proof/maximum-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module MAXIMUM-SPEC - imports KMIR - - claim [maximum-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 50 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 25 ) , // <- this is the reference to `maximum` - id: mirConstId ( 9 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 25 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 64 , false ) , ty ( 26 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 64 , false ) , ty ( 26 ) , _ ) ) - ListItem ( typedValue ( Integer ( C , 64 , false ) , ty ( 26 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 64, false), ty ( 26 ) , ?_ )) - ?_ - - - _ => ?_ - - ty ( 25 ) |-> monoItemFn (... name: symbol ( "maximum" ) , id: defId ( 7 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 69 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 69 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 71 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 72 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 3 ) ) , span: span ( 70 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 7 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 74 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandMove ( place (... local: local ( 7 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 73 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 6 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 5 ) ) .Branches , otherwise: basicBlockIdx ( 4 ) ) ) , span: span ( 73 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 76 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 77 ) ) .Statements , terminator: terminator (... kind: terminatorKindGoto (... target: basicBlockIdx ( 6 ) ) , span: span ( 75 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 78 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 26 ) , span: span ( 79 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 80 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 81 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 82 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 83 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 29 ) , span: span ( 69 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 29 ) , span: span ( 73 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 26 ) , span: span ( 74 ) , mut: mutabilityMut ) .LocalDecls , argCount: 3 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 80 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 81 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "c" ) , sourceInfo: sourceInfo (... span: span ( 82 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 3 ) ) varDebugInfo (... name: symbol ( "max_ab" ) , sourceInfo: sourceInfo (... span: span ( 83 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 84 ) ) ) ) - - - requires // invariant of the `Integer` constructor - 0 <=Int A - andBool A i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_add(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot b/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot deleted file mode 100644 index 079803cdd..000000000 --- a/rust-verification-proofs/unchecked_add/unchecked-add.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_add"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - subgraph cluster_0 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_1 [label="_0"]; - Xecf30c325a77cae0_0 [label="Call\l"]; - Xecf30c325a77cae0_1 [label="Return\l"]; - } - Xecf30c325a77cae0_0 -> Xecf30c325a77cae0_0: _1 [label=""]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xf28f42e91011344a_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X4f9055e3140841d0_0 -> X4f9055e3140841d0_1 [label="_5"]; - X4f9055e3140841d0_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X4f9055e3140841d0_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X4f9055e3140841d0_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_3 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X3d323724ddeb8015_0 -> X3d323724ddeb8015_1 [label="_0"]; - X3d323724ddeb8015_0 [label="Call\l"]; - X3d323724ddeb8015_1 -> X3d323724ddeb8015_2 [label="_2"]; - X3d323724ddeb8015_1 [label="Call\l"]; - X3d323724ddeb8015_2 [label="Return\l"]; - } - X3d323724ddeb8015_0 -> Xecf30c325a77cae0_0 [label="_1,const :: ()"]; - X3d323724ddeb8015_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_4 { - label="main"; - style="filled"; - color=palegreen; - X899bfc87e7e82e90_0 -> X899bfc87e7e82e90_1 [label="_3"]; - X899bfc87e7e82e90_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - X899bfc87e7e82e90_1 -> X899bfc87e7e82e90_2; - X899bfc87e7e82e90_1 [label="_6 <- chkd-Add(_1, _2)\lAssert _6.1 == false\l"]; - X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_6 [label="0"]; - X899bfc87e7e82e90_2 -> X899bfc87e7e82e90_3 [label="other"]; - X899bfc87e7e82e90_2 [label="_5 <- Use(_6.0)\l_4 <- Lt(_5, const :: i16)\lSwitchInt _4\l"]; - X899bfc87e7e82e90_3 -> X899bfc87e7e82e90_4; - X899bfc87e7e82e90_3 [label="_9 <- chkd-Add(_1, _2)\lAssert _9.1 == false\l"]; - X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_6 [label="0"]; - X899bfc87e7e82e90_4 -> X899bfc87e7e82e90_5 [label="other"]; - X899bfc87e7e82e90_4 [label="_8 <- Use(_9.0)\l_7 <- Gt(_8, const :: i16)\lSwitchInt _7\l"]; - X899bfc87e7e82e90_5 [label="Return\l"]; - X899bfc87e7e82e90_6 [label="Call\l"]; - } - X899bfc87e7e82e90_0 -> X7464f1e6ba435b2a_0 [label="_1,_2"]; - X899bfc87e7e82e90_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_5 { - label="core::num::::unchecked_add::prec\nondition_check"; - style="filled"; - color=lightgray; - X3f7834dda050e10_0 -> X3f7834dda050e10_2 [label="0"]; - X3f7834dda050e10_0 -> X3f7834dda050e10_1 [label="other"]; - X3f7834dda050e10_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Add(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - X3f7834dda050e10_1 [label="Call\l"]; - X3f7834dda050e10_2 [label="Return\l"]; - } - X3f7834dda050e10_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_3 [label="Cleanup"]; - Xade51bc3a8f52008_0 -> Xade51bc3a8f52008_1 [label="_0"]; - Xade51bc3a8f52008_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xade51bc3a8f52008_1 -> Xade51bc3a8f52008_2; - Xade51bc3a8f52008_1 [label="Drop _1\l"]; - Xade51bc3a8f52008_2 [label="Return\l"]; - Xade51bc3a8f52008_3 -> Xade51bc3a8f52008_4; - Xade51bc3a8f52008_3 [label="Drop _1\l"]; - Xade51bc3a8f52008_4 [label="Resume\l"]; - } - Xade51bc3a8f52008_0 -> X48be982d2a4cc59b_0 [label="_3,_2"]; - subgraph cluster_7 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X9c80f3743f4f0c10_0 -> X9c80f3743f4f0c10_1 [label="_0"]; - X9c80f3743f4f0c10_0 [label="Call\l"]; - X9c80f3743f4f0c10_1 [label="Return\l"]; - } - X9c80f3743f4f0c10_0 -> Xade51bc3a8f52008_0 [label="_1*,_2"]; - subgraph cluster_8 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X7464f1e6ba435b2a_0 -> X7464f1e6ba435b2a_1 [label="_0"]; - X7464f1e6ba435b2a_0 [label="Call\l"]; - X7464f1e6ba435b2a_1 [label="Return\l"]; - } - X7464f1e6ba435b2a_0 -> X354cc96a778c463_0 [label="_1,_2"]; - subgraph cluster_9 { - label="core::num::::unchecked_add"; - style="filled"; - color=lightgray; - X354cc96a778c463_0 -> X354cc96a778c463_2 [label="0"]; - X354cc96a778c463_0 -> X354cc96a778c463_1 [label="other"]; - X354cc96a778c463_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - X354cc96a778c463_1 -> X354cc96a778c463_2 [label="_4"]; - X354cc96a778c463_1 [label="Call\l"]; - X354cc96a778c463_2 [label="Storage Dead _3\l_0 <- AddUnchecked(_1, _2)\lReturn\l"]; - } - X354cc96a778c463_1 -> X3f7834dda050e10_0 [label="_1,_2"]; - subgraph cluster_10 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X5f7c0242b1a5f905_0 [label="Return\l"]; - } - subgraph cluster_11 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X48be982d2a4cc59b_0 -> X48be982d2a4cc59b_1 [label="_3"]; - X48be982d2a4cc59b_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X48be982d2a4cc59b_1 -> X48be982d2a4cc59b_2 [label="_2"]; - X48be982d2a4cc59b_1 [label="Storage Dead _4\lCall\l"]; - X48be982d2a4cc59b_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X48be982d2a4cc59b_0 -> X3d323724ddeb8015_0 [label="_4"]; - X48be982d2a4cc59b_1 -> Xf28f42e91011344a_0 [label="_3"]; -} diff --git a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json b/rust-verification-proofs/unchecked_add/unchecked-add.smir.json deleted file mode 100644 index 922645c86..000000000 --- a/rust-verification-proofs/unchecked_add/unchecked-add.smir.json +++ /dev/null @@ -1,2969 +0,0 @@ -{ - "name": "unchecked_add", - "crate_id": 1100512358528492573, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 97, - 100, - 100, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 40, - 97, - 32, - 43, - 32, - 98, - 32, - 60, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 65, - 88, - 41, - 32, - 38, - 38, - 32, - 40, - 97, - 32, - 43, - 32, - 98, - 32, - 62, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 73, - 78, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E" - } - ], - [ - 35, - { - "NoOpSym": "" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE" - } - ], - [ - 24, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h17d68f5611d66607E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h0291b845513194feE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - }, - { - "ty": 31, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hb413cb4b795f44bdE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h09a06d2333d66d4fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17ha7140c6faa1714efE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h33222579c945f633E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 70 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17heee117164e3df5a6E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 11 - } - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": "Return", - "span": 71 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 74, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 74, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 75 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_add12unchecked_op17hb77bdfd7a5134cbcE", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 93, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 96, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 97, - "mutability": "Not" - }, - { - "ty": 23, - "span": 98, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 97, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 98, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_sum", - "source_info": { - "span": 99, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 100 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add18precondition_check17h04d8e1fecfd727b1E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 62, - "mutability": "Not" - }, - { - "ty": 23, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_add4main17hd8e1c5b7245124d4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 13 - } - } - } - } - ] - }, - "span": 78 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 213, - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 79 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 76, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 12 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 80 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Constant": { - "span": 82, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255, - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 15 - } - } - } - ] - } - ] - }, - "span": 81 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 3 - } - } - }, - "span": 81 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 83 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 83 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - ] - } - ] - }, - "span": 84 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 5 - } - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 87, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 58, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 18 - } - } - } - ], - "destination": { - "local": 10, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 87 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 89, - "mutability": "Not" - }, - { - "ty": 23, - "span": 90, - "mutability": "Not" - }, - { - "ty": 23, - "span": 91, - "mutability": "Not" - }, - { - "ty": 21, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 87, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 90, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 91, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 92 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h93f467e711116c30E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_add17hc6a6fb35c3f093a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_add", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "AddUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 23, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - } - ], - "types": [ - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k b/rust-verification-proofs/unchecked_add/unchecked-op-spec.k deleted file mode 100644 index cc8f79d0c..000000000 --- a/rust-verification-proofs/unchecked_add/unchecked-op-spec.k +++ /dev/null @@ -1,75 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpAddUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_add::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpAdd , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - - requires // i16 invariants - 0 -Int (1 < i16::MAX) && (a * b < i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_mul(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot deleted file mode 100644 index 1fd26d6eb..000000000 --- a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_mul"; - node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X8f01db0e36395c71_0 -> X8f01db0e36395c71_1 [label="_0"]; - X8f01db0e36395c71_0 [label="Call\l"]; - X8f01db0e36395c71_1 [label="Return\l"]; - } - X8f01db0e36395c71_0 -> X8f01db0e36395c71_0: _1 [label=""]; - subgraph cluster_1 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X9e222efa6b726605_0 [label="Return\l"]; - } - subgraph cluster_2 { - label="core::num::::unchecked_mul"; - style="filled"; - color=lightgray; - Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_2 [label="0"]; - Xeba6f5d5a379e29a_0 -> Xeba6f5d5a379e29a_1 [label="other"]; - Xeba6f5d5a379e29a_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xeba6f5d5a379e29a_1 -> Xeba6f5d5a379e29a_2 [label="_4"]; - Xeba6f5d5a379e29a_1 [label="Call\l"]; - Xeba6f5d5a379e29a_2 [label="Storage Dead _3\l_0 <- MulUnchecked(_1, _2)\lReturn\l"]; - } - Xeba6f5d5a379e29a_1 -> X9b97bece994ebb51_0 [label="_1,_2"]; - subgraph cluster_3 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X62f87ed0bcd6b426_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_4 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X69af4523a03742d5_0 -> X69af4523a03742d5_1 [label="_3"]; - X69af4523a03742d5_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X69af4523a03742d5_1 -> X69af4523a03742d5_2 [label="_2"]; - X69af4523a03742d5_1 [label="Storage Dead _4\lCall\l"]; - X69af4523a03742d5_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X69af4523a03742d5_0 -> Xcb8fb0027af607b6_0 [label="_4"]; - X69af4523a03742d5_1 -> X62f87ed0bcd6b426_0 [label="_3"]; - subgraph cluster_5 { - label="core::num::::unchecked_mul::prec\nondition_check"; - style="filled"; - color=lightgray; - X9b97bece994ebb51_0 -> X9b97bece994ebb51_2 [label="0"]; - X9b97bece994ebb51_0 -> X9b97bece994ebb51_1 [label="other"]; - X9b97bece994ebb51_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Mul(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - X9b97bece994ebb51_1 [label="Call\l"]; - X9b97bece994ebb51_2 [label="Return\l"]; - } - X9b97bece994ebb51_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X797ddd37b7ea3b5e_0 -> X797ddd37b7ea3b5e_1 [label="_5"]; - X797ddd37b7ea3b5e_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X797ddd37b7ea3b5e_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X797ddd37b7ea3b5e_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_7 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - Xcb8fb0027af607b6_0 -> Xcb8fb0027af607b6_1 [label="_0"]; - Xcb8fb0027af607b6_0 [label="Call\l"]; - Xcb8fb0027af607b6_1 -> Xcb8fb0027af607b6_2 [label="_2"]; - Xcb8fb0027af607b6_1 [label="Call\l"]; - Xcb8fb0027af607b6_2 [label="Return\l"]; - } - Xcb8fb0027af607b6_0 -> X8f01db0e36395c71_0 [label="_1,const :: ()"]; - Xcb8fb0027af607b6_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_8 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X201617fc87c04742_0 -> X201617fc87c04742_1 [label="_0"]; - X201617fc87c04742_0 [label="Call\l"]; - X201617fc87c04742_1 [label="Return\l"]; - } - X201617fc87c04742_0 -> X86afcabc1ac42f91_0 [label="_1*,_2"]; - subgraph cluster_9 { - label="main"; - style="filled"; - color=palegreen; - Xe63d82c3b46f3acf_0 -> Xe63d82c3b46f3acf_1 [label="_3"]; - Xe63d82c3b46f3acf_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - Xe63d82c3b46f3acf_1 -> Xe63d82c3b46f3acf_2; - Xe63d82c3b46f3acf_1 [label="_6 <- chkd-Mul(_1, _2)\lAssert _6.1 == false\l"]; - Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_6 [label="0"]; - Xe63d82c3b46f3acf_2 -> Xe63d82c3b46f3acf_3 [label="other"]; - Xe63d82c3b46f3acf_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; - Xe63d82c3b46f3acf_3 -> Xe63d82c3b46f3acf_4; - Xe63d82c3b46f3acf_3 [label="_9 <- chkd-Mul(_1, _2)\lAssert _9.1 == false\l"]; - Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_6 [label="0"]; - Xe63d82c3b46f3acf_4 -> Xe63d82c3b46f3acf_5 [label="other"]; - Xe63d82c3b46f3acf_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; - Xe63d82c3b46f3acf_5 [label="Return\l"]; - Xe63d82c3b46f3acf_6 [label="Call\l"]; - } - Xe63d82c3b46f3acf_0 -> Xbe62f93610b866bf_0 [label="_1,_2"]; - Xe63d82c3b46f3acf_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_10 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_3 [label="Cleanup"]; - X86afcabc1ac42f91_0 -> X86afcabc1ac42f91_1 [label="_0"]; - X86afcabc1ac42f91_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X86afcabc1ac42f91_1 -> X86afcabc1ac42f91_2; - X86afcabc1ac42f91_1 [label="Drop _1\l"]; - X86afcabc1ac42f91_2 [label="Return\l"]; - X86afcabc1ac42f91_3 -> X86afcabc1ac42f91_4; - X86afcabc1ac42f91_3 [label="Drop _1\l"]; - X86afcabc1ac42f91_4 [label="Resume\l"]; - } - X86afcabc1ac42f91_0 -> X69af4523a03742d5_0 [label="_3,_2"]; - subgraph cluster_11 { - label="unchecked_op"; - style="filled"; - color=palegreen; - Xbe62f93610b866bf_0 -> Xbe62f93610b866bf_1 [label="_0"]; - Xbe62f93610b866bf_0 [label="Call\l"]; - Xbe62f93610b866bf_1 [label="Return\l"]; - } - Xbe62f93610b866bf_0 -> Xeba6f5d5a379e29a_0 [label="_1,_2"]; -} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json b/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json deleted file mode 100644 index 854f39e8c..000000000 --- a/rust-verification-proofs/unchecked_mul/unchecked-mul.smir.json +++ /dev/null @@ -1,2969 +0,0 @@ -{ - "name": "unchecked_mul", - "crate_id": 5290701492876642493, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 40, - 97, - 32, - 42, - 32, - 98, - 32, - 62, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 65, - 88, - 41, - 32, - 38, - 38, - 32, - 40, - 97, - 32, - 42, - 32, - 98, - 32, - 60, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 73, - 78, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 109, - 117, - 108, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 24, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE" - } - ], - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN13unchecked_mul4main17h0cc64cae78556d0bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 13 - } - } - } - } - ] - }, - "span": 78 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 213, - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 79 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 76, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 12 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 80 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Constant": { - "span": 82, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255, - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 15 - } - } - } - ] - } - ] - }, - "span": 81 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 3 - } - } - }, - "span": 81 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 83 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 83 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - ] - } - ] - }, - "span": 84 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 5 - } - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 87, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 58, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 18 - } - } - } - ], - "destination": { - "local": 10, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 87 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 89, - "mutability": "Not" - }, - { - "ty": 23, - "span": 90, - "mutability": "Not" - }, - { - "ty": 23, - "span": 91, - "mutability": "Not" - }, - { - "ty": 21, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 87, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 90, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 91, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 92 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hb8b53f1817c7e665E", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h5b2f5469e34d2361E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h31a74050610bb332E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - }, - { - "ty": 31, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_mul12unchecked_op17h902dc50078ac4b1bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 93, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 96, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 97, - "mutability": "Not" - }, - { - "ty": 23, - "span": 98, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 97, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 98, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 99, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 100 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17ha4f7cb0ecda5b06fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 11 - } - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": "Return", - "span": 71 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 74, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 74, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 75 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h1605703b5e185bd0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul17hb98d90b4ef66f8afE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_mul", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "MulUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 23, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h55a65a2f2b911c7cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 70 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hfdc6fe355496207dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h622dfc73695dd548E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_mul18precondition_check17hd76b192169da5a68E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_mul::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Mul", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 62, - "mutability": "Not" - }, - { - "ty": 23, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - } - ], - "types": [ - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k b/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k deleted file mode 100644 index 5e13f0298..000000000 --- a/rust-verification-proofs/unchecked_mul/unchecked-op-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpMulUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_mul::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpMul , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_neg() }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot deleted file mode 100644 index f0e5d18e2..000000000 --- a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.dot +++ /dev/null @@ -1,137 +0,0 @@ -digraph { - label="unchecked_neg"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8fc2060ad58510d8_0 [label="Intr: \ncold_path", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label="core::num::::unchecked_neg::prec\nondition_check"; - style="filled"; - color=lightgray; - X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_3 [label="0"]; - X4dfedea7d15dfae0_0 -> X4dfedea7d15dfae0_1 [label="other"]; - X4dfedea7d15dfae0_0 [label="Storage Live _3\l_3 <- Eq(_1, const :: i16)\lSwitchInt _3\l"]; - X4dfedea7d15dfae0_1 -> X4dfedea7d15dfae0_2 [label="_4"]; - X4dfedea7d15dfae0_1 [label="Call\l"]; - X4dfedea7d15dfae0_2 [label="Storage Dead _3\lCall\l"]; - X4dfedea7d15dfae0_3 [label="Storage Dead _3\lReturn\l"]; - } - X4dfedea7d15dfae0_1 -> X8fc2060ad58510d8_0 [label=""]; - X4dfedea7d15dfae0_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_1 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xc472594511031ccd_0 [label="Return\l"]; - } - subgraph cluster_2 { - label="main"; - style="filled"; - color=palegreen; - X83ac00eefa6b73fd_0 -> X83ac00eefa6b73fd_1 [label="_1"]; - X83ac00eefa6b73fd_0 [label="_2 <- Use(const :: i16)\lCall\l"]; - X83ac00eefa6b73fd_1 [label="Return\l"]; - } - X83ac00eefa6b73fd_0 -> X25395281e54f77f2_0 [label="_2"]; - subgraph cluster_3 { - label="std::intrinsics::cold_pat\nh"; - style="filled"; - color=lightgray; - X3664cff3ef814fcc_0 [label="Return\l"]; - } - subgraph cluster_4 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X1e8170c41331abcf_0 -> X1e8170c41331abcf_1 [label="_3"]; - X1e8170c41331abcf_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X1e8170c41331abcf_1 -> X1e8170c41331abcf_2 [label="_2"]; - X1e8170c41331abcf_1 [label="Storage Dead _4\lCall\l"]; - X1e8170c41331abcf_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X1e8170c41331abcf_0 -> Xfd6302c9a18672af_0 [label="_4"]; - X1e8170c41331abcf_1 -> Xd2fa5dcfbfecedff_0 [label="_3"]; - subgraph cluster_5 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - Xfd6302c9a18672af_0 -> Xfd6302c9a18672af_1 [label="_0"]; - Xfd6302c9a18672af_0 [label="Call\l"]; - Xfd6302c9a18672af_1 -> Xfd6302c9a18672af_2 [label="_2"]; - Xfd6302c9a18672af_1 [label="Call\l"]; - Xfd6302c9a18672af_2 [label="Return\l"]; - } - Xfd6302c9a18672af_0 -> Xab2b2ee52cc1a3b6_0 [label="_1,const :: ()"]; - Xfd6302c9a18672af_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_6 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X25395281e54f77f2_0 -> X25395281e54f77f2_1 [label="_0"]; - X25395281e54f77f2_0 [label="Call\l"]; - X25395281e54f77f2_1 [label="Return\l"]; - } - X25395281e54f77f2_0 -> X36f7f4bce11fe0f_0 [label="_1"]; - subgraph cluster_7 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xd2fa5dcfbfecedff_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_8 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_1 [label="_0"]; - Xab2b2ee52cc1a3b6_0 [label="Call\l"]; - Xab2b2ee52cc1a3b6_1 [label="Return\l"]; - } - Xab2b2ee52cc1a3b6_0 -> Xab2b2ee52cc1a3b6_0: _1 [label=""]; - subgraph cluster_9 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xa028f493aff12071_0 -> Xa028f493aff12071_1 [label="_0"]; - Xa028f493aff12071_0 [label="Call\l"]; - Xa028f493aff12071_1 [label="Return\l"]; - } - Xa028f493aff12071_0 -> X39f0dcc2beb3cbfc_0 [label="_1*,_2"]; - subgraph cluster_10 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_3 [label="Cleanup"]; - X39f0dcc2beb3cbfc_0 -> X39f0dcc2beb3cbfc_1 [label="_0"]; - X39f0dcc2beb3cbfc_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X39f0dcc2beb3cbfc_1 -> X39f0dcc2beb3cbfc_2; - X39f0dcc2beb3cbfc_1 [label="Drop _1\l"]; - X39f0dcc2beb3cbfc_2 [label="Return\l"]; - X39f0dcc2beb3cbfc_3 -> X39f0dcc2beb3cbfc_4; - X39f0dcc2beb3cbfc_3 [label="Drop _1\l"]; - X39f0dcc2beb3cbfc_4 [label="Resume\l"]; - } - X39f0dcc2beb3cbfc_0 -> X1e8170c41331abcf_0 [label="_3,_2"]; - subgraph cluster_11 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X1752551397e242d3_0 -> X1752551397e242d3_1 [label="_5"]; - X1752551397e242d3_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X1752551397e242d3_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X1752551397e242d3_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_12 { - label="core::num::::unchecked_neg"; - style="filled"; - color=lightgray; - X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_2 [label="0"]; - X36f7f4bce11fe0f_0 -> X36f7f4bce11fe0f_1 [label="other"]; - X36f7f4bce11fe0f_0 [label="Storage Live _2\l_2 <- UbChecks :: bool\lSwitchInt _2\l"]; - X36f7f4bce11fe0f_1 -> X36f7f4bce11fe0f_2 [label="_3"]; - X36f7f4bce11fe0f_1 [label="Call\l"]; - X36f7f4bce11fe0f_2 [label="Storage Dead _2\l_0 <- SubUnchecked(const :: i16, _1)\lReturn\l"]; - } - X36f7f4bce11fe0f_1 -> X4dfedea7d15dfae0_0 [label="_1"]; -} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json b/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json deleted file mode 100644 index a97297a9a..000000000 --- a/rust-verification-proofs/unchecked_neg/unchecked-neg.smir.json +++ /dev/null @@ -1,2339 +0,0 @@ -{ - "name": "unchecked_neg", - "crate_id": 8515610171801290459, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 110, - 101, - 103, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E" - } - ], - [ - 25, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE" - } - ], - [ - 24, - { - "IntrinsicSym": "cold_path" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg17hd552beaa8f08b68cE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_neg", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 46 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 47 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 46 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 48, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 49 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 2 - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "SubUnchecked", - { - "Constant": { - "span": 52, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 7 - } - } - }, - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": "Return", - "span": 50 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 55, - "mutability": "Not" - }, - { - "ty": 21, - "span": 46, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 49, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 55, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 56 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hb51e7d14dd6bbaa1E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 14 - } - } - } - } - ] - }, - "span": 75 - } - ], - "terminator": { - "kind": "Return", - "span": 74 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 76, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 77, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 77, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 78 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17ha1c9e0c2464dfe2fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h6a814db6448cf238E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_neg4main17h279e62d4b439df5fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 9, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 81, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - } - ] - }, - "span": 82 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 15 - } - } - }, - "args": [ - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 83 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 85, - "mutability": "Not" - }, - { - "ty": 23, - "span": 82, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 86, - "scope": 1 - }, - "composite": null, - "value": { - "Const": { - "span": 81, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 85, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 87 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hfbe76daea5fdf462E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 6, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 13 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 72 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 72, - "mutability": "Not" - }, - { - "ty": 1, - "span": 72, - "mutability": "Not" - }, - { - "ty": 31, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 72 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_neg18precondition_check17he9e12da03c3013a2E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_neg::precondition_check", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 58 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 59, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 8 - } - } - } - ] - } - ] - }, - "span": 58 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 1 - } - } - }, - "span": 57 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 9 - } - } - }, - "args": [], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 61 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 65 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 62, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 10 - } - } - }, - "args": [ - { - "Constant": { - "span": 63, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 11 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 64 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 65 - } - ], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 67, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 68, - "mutability": "Not" - }, - { - "ty": 27, - "span": 64, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 61, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 68, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 69, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 70, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 71 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17hb1f3d0709a208656E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 12 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 72 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 72, - "mutability": "Not" - }, - { - "ty": 1, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 72 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h60ae3c7f0ee6df8cE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 72 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 72, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 72, - "mutability": "Not" - }, - { - "ty": 1, - "span": 72, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 72 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_neg12unchecked_op17h57b358f78d878b46E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 10, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 88, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 89 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 90 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 91, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 92, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 92, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 93, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 94 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8aa37b4c103d811fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core10intrinsics9cold_path17h92f2760454f1a94aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::intrinsics::cold_path", - "id": 3, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 44, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [], - "spread_arg": null, - "span": 45 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h5c05d4f8c33c04feE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 7, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 73 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 73, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 73 - } - } - }, - "details": null - } - ], - "types": [ - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k b/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k deleted file mode 100644 index 6716fe2fb..000000000 --- a/rust-verification-proofs/unchecked_neg/unchecked-op-spec.k +++ /dev/null @@ -1,71 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 79 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 15 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 10 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 88 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 17 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 89 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 90 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 91 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 92 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 92 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 93 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 94 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 46 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 47 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 46 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 48 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 49 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 51 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandConstant ( constOperand (... span: span ( 52 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 7 ) ) ) ) , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 53 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 50 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 55 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 46 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 49 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 55 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 56 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_neg::precondition_check" ) , id: defId ( 5 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 58 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpEq , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x80" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 2 ) , mutability: mutabilityMut ) ) , ty: ty ( 23 ) , id: mirConstId ( 8 ) ) ) ) ) ) , span: span ( 58 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 3 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 57 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 9 ) ) ) ) , args: .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 61 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 62 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 10 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 63 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 11 ) ) ) ) .Operands , destination: place (... local: local ( 2 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 64 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 65 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 66 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 67 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 68 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 64 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 68 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 69 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 70 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 71 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 71 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 13 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShlUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shl::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_shl(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot deleted file mode 100644 index b621a4e00..000000000 --- a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.dot +++ /dev/null @@ -1,127 +0,0 @@ -digraph { - label="unchecked_shl"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - subgraph cluster_0 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X7ca0ff879d4d13eb_0 -> X7ca0ff879d4d13eb_1 [label="_0"]; - X7ca0ff879d4d13eb_0 [label="Call\l"]; - X7ca0ff879d4d13eb_1 [label="Return\l"]; - } - X7ca0ff879d4d13eb_0 -> Xf64250b1070257e5_0 [label="_1*,_2"]; - subgraph cluster_1 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_1 [label="_0"]; - Xca73baf8b721e82c_0 [label="Call\l"]; - Xca73baf8b721e82c_1 [label="Return\l"]; - } - Xca73baf8b721e82c_0 -> Xca73baf8b721e82c_0: _1 [label=""]; - subgraph cluster_2 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X6985b604fd3ae6be_0 -> X6985b604fd3ae6be_1 [label="_0"]; - X6985b604fd3ae6be_0 [label="Call\l"]; - X6985b604fd3ae6be_1 [label="Return\l"]; - } - X6985b604fd3ae6be_0 -> Xe1c01b35d6c2026f_0 [label="_1,_2"]; - subgraph cluster_3 { - label="core::num::::unchecked_shl"; - style="filled"; - color=lightgray; - Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_2 [label="0"]; - Xe1c01b35d6c2026f_0 -> Xe1c01b35d6c2026f_1 [label="other"]; - Xe1c01b35d6c2026f_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xe1c01b35d6c2026f_1 -> Xe1c01b35d6c2026f_2 [label="_4"]; - Xe1c01b35d6c2026f_1 [label="Call\l"]; - Xe1c01b35d6c2026f_2 [label="Storage Dead _3\l_0 <- ShlUnchecked(_1, _2)\lReturn\l"]; - } - Xe1c01b35d6c2026f_1 -> X739610367822bd9b_0 [label="_2"]; - subgraph cluster_4 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xf64250b1070257e5_0 -> Xf64250b1070257e5_3 [label="Cleanup"]; - Xf64250b1070257e5_0 -> Xf64250b1070257e5_1 [label="_0"]; - Xf64250b1070257e5_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xf64250b1070257e5_1 -> Xf64250b1070257e5_2; - Xf64250b1070257e5_1 [label="Drop _1\l"]; - Xf64250b1070257e5_2 [label="Return\l"]; - Xf64250b1070257e5_3 -> Xf64250b1070257e5_4; - Xf64250b1070257e5_3 [label="Drop _1\l"]; - Xf64250b1070257e5_4 [label="Resume\l"]; - } - Xf64250b1070257e5_0 -> X8c1d75f364744448_0 [label="_3,_2"]; - subgraph cluster_5 { - label="core::num::::unchecked_shl::prec\nondition_check"; - style="filled"; - color=lightgray; - X739610367822bd9b_0 -> X739610367822bd9b_2 [label="0"]; - X739610367822bd9b_0 -> X739610367822bd9b_1 [label="other"]; - X739610367822bd9b_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; - X739610367822bd9b_1 [label="Storage Dead _2\lReturn\l"]; - X739610367822bd9b_2 [label="Call\l"]; - } - X739610367822bd9b_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X8c1d75f364744448_0 -> X8c1d75f364744448_1 [label="_3"]; - X8c1d75f364744448_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X8c1d75f364744448_1 -> X8c1d75f364744448_2 [label="_2"]; - X8c1d75f364744448_1 [label="Storage Dead _4\lCall\l"]; - X8c1d75f364744448_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X8c1d75f364744448_0 -> X92deb757c4463693_0 [label="_4"]; - X8c1d75f364744448_1 -> X9e057dae70d0b216_0 [label="_3"]; - subgraph cluster_7 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xebd6923e157bf244_0 [label="Return\l"]; - } - subgraph cluster_8 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - Xd9564944a8357ebc_0 -> Xd9564944a8357ebc_1 [label="_5"]; - Xd9564944a8357ebc_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - Xd9564944a8357ebc_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - Xd9564944a8357ebc_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_9 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X92deb757c4463693_0 -> X92deb757c4463693_1 [label="_0"]; - X92deb757c4463693_0 [label="Call\l"]; - X92deb757c4463693_1 -> X92deb757c4463693_2 [label="_2"]; - X92deb757c4463693_1 [label="Call\l"]; - X92deb757c4463693_2 [label="Return\l"]; - } - X92deb757c4463693_0 -> Xca73baf8b721e82c_0 [label="_1,const :: ()"]; - X92deb757c4463693_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_10 { - label="main"; - style="filled"; - color=palegreen; - Xb244b26227a3c207_0 -> Xb244b26227a3c207_1 [label="_1"]; - Xb244b26227a3c207_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; - Xb244b26227a3c207_1 [label="Return\l"]; - } - Xb244b26227a3c207_0 -> X6985b604fd3ae6be_0 [label="_2,_3"]; - subgraph cluster_11 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X9e057dae70d0b216_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } -} diff --git a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json b/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json deleted file mode 100644 index 304a8ec60..000000000 --- a/rust-verification-proofs/unchecked_shl/unchecked-shl.smir.json +++ /dev/null @@ -1,2353 +0,0 @@ -{ - "name": "unchecked_shl", - "crate_id": 2438242285894030786, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 104, - 108, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 25, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8d9bd3fe0d7269eeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h4b70c8118c54af25E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h37b066032638b121E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_shl12unchecked_op17hd4a3ff3868f92a15E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 83, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 16 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 85 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 86, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 87, - "mutability": "Not" - }, - { - "ty": 24, - "span": 88, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 87, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 88, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 90 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h9f429e673a679d71E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 11 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - }, - { - "ty": 31, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl18precondition_check17hcf68c28ca91fddc3E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shl::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 16, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 7 - } - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 2 - }, - "span": 57 - } - ], - "terminator": { - "kind": "Return", - "span": 56 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 8 - } - } - }, - "args": [ - { - "Constant": { - "span": 59, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 9 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 60 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 62, - "mutability": "Not" - }, - { - "ty": 21, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 60, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "rhs", - "source_info": { - "span": 62, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 63 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h8ecde983d4a6aac4E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 65, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 65 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h2fdebf4745149b1aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 67, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 12 - } - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 69, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_shl4main17h99915c6a84d89e82E", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - } - } - ] - }, - "span": 76 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 71, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } - }, - "args": [ - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 77 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 78, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 79, - "mutability": "Not" - }, - { - "ty": 23, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 76, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 1 - }, - "composite": null, - "value": { - "Const": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 79, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 82 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17hfe391b3d6e18ac1aE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h012f9e9f9a275beeE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shl17hfe870233a98bb3cbE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shl", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "ShlUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 24, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - } - ], - "types": [ - [ - 24, - { - "RigidTy": { - "Uint": "U32" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k b/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k deleted file mode 100644 index 88c672c3c..000000000 --- a/rust-verification-proofs/unchecked_shr/unchecked-op-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 71 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 13 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 32 , false ) , ty ( 24 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 83 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 33 ) , id: mirConstId ( 16 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 84 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 85 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 86 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 87 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 88 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 87 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 88 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_res" ) , sourceInfo: sourceInfo (... span: span ( 89 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 90 ) ) ) ) - ty ( 33 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpShrUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 24 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_shr::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 2 ) ) , span: span ( 54 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 2 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpLt , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandConstant ( constOperand (... span: span ( 55 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x10\x00\x00\x00" , provenance: provenanceMap (... ptrs: .ProvenanceMapEntries ) , align: align ( 4 ) , mutability: mutabilityMut ) ) , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) ) ) , span: span ( 54 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 2 ) ) , span: span ( 57 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 56 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 58 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 59 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 26 ) , id: mirConstId ( 9 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 60 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 61 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 24 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 54 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 27 ) , span: span ( 60 ) , mut: mutabilityNot ) .LocalDecls , argCount: 1 , varDebugInfo: varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 62 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 63 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16 { - let unchecked_res = unsafe { a.unchecked_shr(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot deleted file mode 100644 index 4bfe94015..000000000 --- a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.dot +++ /dev/null @@ -1,127 +0,0 @@ -digraph { - label="unchecked_shr"; - node [shape=rectangle]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - subgraph cluster_0 { - label="core::num::::unchecked_shr"; - style="filled"; - color=lightgray; - X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_2 [label="0"]; - X3dfb10421593b1e8_0 -> X3dfb10421593b1e8_1 [label="other"]; - X3dfb10421593b1e8_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - X3dfb10421593b1e8_1 -> X3dfb10421593b1e8_2 [label="_4"]; - X3dfb10421593b1e8_1 [label="Call\l"]; - X3dfb10421593b1e8_2 [label="Storage Dead _3\l_0 <- ShrUnchecked(_1, _2)\lReturn\l"]; - } - X3dfb10421593b1e8_1 -> X67406d0b881e84da_0 [label="_2"]; - subgraph cluster_1 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X1fcbbfbc6742d998_0 -> X1fcbbfbc6742d998_1 [label="_5"]; - X1fcbbfbc6742d998_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X1fcbbfbc6742d998_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X1fcbbfbc6742d998_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_2 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X2ea79ec23c0f6969_0 -> X2ea79ec23c0f6969_1 [label="_0"]; - X2ea79ec23c0f6969_0 [label="Call\l"]; - X2ea79ec23c0f6969_1 [label="Return\l"]; - } - X2ea79ec23c0f6969_0 -> X3dfb10421593b1e8_0 [label="_1,_2"]; - subgraph cluster_3 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X308478c52589b452_0 -> X308478c52589b452_1 [label="_0"]; - X308478c52589b452_0 [label="Call\l"]; - X308478c52589b452_1 [label="Return\l"]; - } - X308478c52589b452_0 -> X308478c52589b452_0: _1 [label=""]; - subgraph cluster_4 { - label="main"; - style="filled"; - color=palegreen; - X74e505ee082dcd3c_0 -> X74e505ee082dcd3c_1 [label="_1"]; - X74e505ee082dcd3c_0 [label="_2 <- Use(const :: i16)\l_3 <- Use(const :: u32)\lCall\l"]; - X74e505ee082dcd3c_1 [label="Return\l"]; - } - X74e505ee082dcd3c_0 -> X2ea79ec23c0f6969_0 [label="_2,_3"]; - subgraph cluster_5 { - label="core::num::::unchecked_shr::prec\nondition_check"; - style="filled"; - color=lightgray; - X67406d0b881e84da_0 -> X67406d0b881e84da_2 [label="0"]; - X67406d0b881e84da_0 -> X67406d0b881e84da_1 [label="other"]; - X67406d0b881e84da_0 [label="Storage Live _2\l_2 <- Lt(_1, const :: u32)\lSwitchInt _2\l"]; - X67406d0b881e84da_1 [label="Storage Dead _2\lReturn\l"]; - X67406d0b881e84da_2 [label="Call\l"]; - } - X67406d0b881e84da_2 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_6 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X63a912d85dcf5dbc_0 -> X63a912d85dcf5dbc_1 [label="_0"]; - X63a912d85dcf5dbc_0 [label="Call\l"]; - X63a912d85dcf5dbc_1 [label="Return\l"]; - } - X63a912d85dcf5dbc_0 -> Xc86fbb6bb8f835bf_0 [label="_1*,_2"]; - subgraph cluster_7 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - X8f6613fb2e5e284f_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_8 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - Xc5c68a464c01d1d6_0 -> Xc5c68a464c01d1d6_1 [label="_3"]; - Xc5c68a464c01d1d6_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - Xc5c68a464c01d1d6_1 -> Xc5c68a464c01d1d6_2 [label="_2"]; - Xc5c68a464c01d1d6_1 [label="Storage Dead _4\lCall\l"]; - Xc5c68a464c01d1d6_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - Xc5c68a464c01d1d6_0 -> X418d756885456e9e_0 [label="_4"]; - Xc5c68a464c01d1d6_1 -> X8f6613fb2e5e284f_0 [label="_3"]; - subgraph cluster_9 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - Xa8d344f9e18404f4_0 [label="Return\l"]; - } - subgraph cluster_10 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X418d756885456e9e_0 -> X418d756885456e9e_1 [label="_0"]; - X418d756885456e9e_0 [label="Call\l"]; - X418d756885456e9e_1 -> X418d756885456e9e_2 [label="_2"]; - X418d756885456e9e_1 [label="Call\l"]; - X418d756885456e9e_2 [label="Return\l"]; - } - X418d756885456e9e_0 -> X308478c52589b452_0 [label="_1,const :: ()"]; - X418d756885456e9e_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_11 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_3 [label="Cleanup"]; - Xc86fbb6bb8f835bf_0 -> Xc86fbb6bb8f835bf_1 [label="_0"]; - Xc86fbb6bb8f835bf_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - Xc86fbb6bb8f835bf_1 -> Xc86fbb6bb8f835bf_2; - Xc86fbb6bb8f835bf_1 [label="Drop _1\l"]; - Xc86fbb6bb8f835bf_2 [label="Return\l"]; - Xc86fbb6bb8f835bf_3 -> Xc86fbb6bb8f835bf_4; - Xc86fbb6bb8f835bf_3 [label="Drop _1\l"]; - Xc86fbb6bb8f835bf_4 [label="Resume\l"]; - } - Xc86fbb6bb8f835bf_0 -> Xc5c68a464c01d1d6_0 [label="_3,_2"]; -} diff --git a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json b/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json deleted file mode 100644 index a18deb336..000000000 --- a/rust-verification-proofs/unchecked_shr/unchecked-shr.smir.json +++ /dev/null @@ -1,2353 +0,0 @@ -{ - "name": "unchecked_shr", - "crate_id": 11374706484823853070, - "allocs": [ - [ - 1, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 104, - 114, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E" - } - ], - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E" - } - ], - [ - 25, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN13unchecked_shr12unchecked_op17h2a1ac9d0b3871611E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 83, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 16 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 85 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 86, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 87, - "mutability": "Not" - }, - { - "ty": 24, - "span": 88, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 87, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 88, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_res", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 90 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h61335465a4c94579E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17hd27a61cafc0479aeE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17hbb922bfe69898febE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 65, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 65, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 65 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hbf45757dbe4d02beE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17hd2b815e8bd96d253E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17hf765569343e64725E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 64 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 11 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - }, - { - "ty": 31, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17hdb65a91a1311fe72E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 67, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 12 - } - } - } - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 68, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 69, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_shr4main17h44e0f2c7ab0ce6aaE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 74 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - } - } - ] - }, - "span": 76 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 71, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 13 - } - } - }, - "args": [ - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 72 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 77 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 78, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 79, - "mutability": "Not" - }, - { - "ty": 23, - "span": 74, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 76, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 80, - "scope": 1 - }, - "composite": null, - "value": { - "Const": { - "span": 73, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 81, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 75, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 4, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 15 - } - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 79, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 82 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17haf866602a749ce47E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 64, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 64 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 64, - "mutability": "Not" - }, - { - "ty": 1, - "span": 64, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 64 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr18precondition_check17h824d51dffb3f069fE", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shr::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 55, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 16, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 4, - "mutability": "Mut" - } - }, - "ty": 24, - "id": 7 - } - } - } - ] - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 2 - }, - "span": 57 - } - ], - "terminator": { - "kind": "Return", - "span": 56 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 58, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 25, - "id": 8 - } - } - }, - "args": [ - { - "Constant": { - "span": 59, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 26, - "id": 9 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 60 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 61, - "mutability": "Mut" - }, - { - "ty": 24, - "span": 62, - "mutability": "Not" - }, - { - "ty": 21, - "span": 54, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 60, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "rhs", - "source_info": { - "span": 62, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 63 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_shr17hfc846427b60a5cb1E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_shr", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "ShrUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 24, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - } - ], - "types": [ - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 24, - { - "RigidTy": { - "Uint": "U32" - } - } - ], - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ] - ], - "debug": null -} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k b/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k deleted file mode 100644 index 4730bf3a4..000000000 --- a/rust-verification-proofs/unchecked_sub/unchecked-op-spec.k +++ /dev/null @@ -1,73 +0,0 @@ -module UNCHECKED-OP-SPEC - imports KMIR - - claim [unchecked-op-spec]: - - ( // LHS, start state - #execTerminator ( - terminator (... - kind: terminatorKindCall (... - func: operandConstant ( - constOperand (... - span: span ( 76 ) , - userTy: noUserTypeAnnotationIndex , - const: mirConst (... - kind: constantKindZeroSized , - ty: ty ( 32 ) , // <- this is the reference to `unchecked_op` - id: mirConstId ( 12 ) - ) - ) - ) , - args: - operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) - operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ), - destination: DEST, - target: noBasicBlockIdx, - // forcing the proof to stop because there is no caller to return to - unwind: _ - ), - span: _ - ) - ) - => - // RHS: target - // #execTerminator ( terminator (... kind: terminatorKindReturn , span: ?_ ) ) - #EndProgram - ) - ~> .K - - _ - _ => ty ( 32 ) - - _ => ?_ - _ => ?_ - _ => DEST - _ => noBasicBlockIdx - _ => ?_ - - ListItem ( _ ) - ListItem ( typedValue ( Integer ( A , 16 , true ) , ty ( 23 ) , _ ) ) - ListItem ( typedValue ( Integer ( B , 16 , true ) , ty ( 23 ) , _ ) ) - // _ // if we keep this we need a lemma for list size predicate simplification - => - ListItem ( typedValue ( Integer ( ?RESULT, 16, true), ty ( 23 ) , ?_ )) - ?_ - - - _ => ?_ - - ( - ty ( 32 ) |-> monoItemFn (... name: symbol ( "unchecked_op" ) , id: defId ( 9 ) , body: someBody ( body (... blocks: basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 93 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 34 ) , id: mirConstId ( 19 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 0 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 1 ) ) , unwind: unwindActionContinue ) , span: span ( 94 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 95 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 96 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 97 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 98 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 97 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 98 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "unchecked_sum" ) , sourceInfo: sourceInfo (... span: span ( 99 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 0 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 100 ) ) ) ) - ty ( 34 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub" ) , id: defId ( 3 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 3 ) ) , span: span ( 43 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 3 ) , projection: .ProjectionElems ) , rvalue: rvalueNullaryOp ( nullOpUbChecks , ty ( 21 ) ) ) , span: span ( 44 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandMove ( place (... local: local ( 3 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 43 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 45 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 22 ) , id: mirConstId ( 6 ) ) ) ) , args: operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) .Operands , destination: place (... local: local ( 4 ) , projection: .ProjectionElems ) , target: someBasicBlockIdx ( basicBlockIdx ( 2 ) ) , unwind: unwindActionUnreachable ) , span: span ( 46 ) ) ) basicBlock (... statements: statement (... kind: statementKindStorageDead ( local ( 3 ) ) , span: span ( 48 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 0 ) , projection: .ProjectionElems ) , rvalue: rvalueBinaryOp ( binOpSubUnchecked , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 49 ) ) .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 47 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 23 ) , span: span ( 50 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 51 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 52 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 43 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 1 ) , span: span ( 46 ) , mut: mutabilityNot ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 51 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 52 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) .VarDebugInfos , spreadArg: noLocal , span: span ( 53 ) ) ) ) - ty ( 22 ) |-> monoItemFn (... name: symbol ( "core::num::::unchecked_sub::precondition_check" ) , id: defId ( 4 ) , body: someBody ( body (... blocks: basicBlock (... statements: statement (... kind: statementKindStorageLive ( local ( 4 ) ) , span: span ( 55 ) ) statement (... kind: statementKindStorageLive ( local ( 6 ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 6 ) , projection: .ProjectionElems ) , rvalue: rvalueCheckedBinaryOp ( binOpSub , operandCopy ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , operandCopy ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) ) ) , span: span ( 56 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 4 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 0 ) , ty ( 23 ) ) .ProjectionElems ) ) ) ) , span: span ( 57 ) ) statement (... kind: statementKindAssign (... place: place (... local: local ( 5 ) , projection: .ProjectionElems ) , rvalue: rvalueUse ( operandCopy ( place (... local: local ( 6 ) , projection: projectionElemField ( fieldIdx ( 1 ) , ty ( 21 ) ) .ProjectionElems ) ) ) ) , span: span ( 58 ) ) statement (... kind: statementKindStorageDead ( local ( 6 ) ) , span: span ( 59 ) ) statement (... kind: statementKindStorageDead ( local ( 4 ) ) , span: span ( 55 ) ) .Statements , terminator: terminator (... kind: terminatorKindSwitchInt (... discr: operandCopy ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , targets: switchTargets (... branches: branch ( 0 , basicBlockIdx ( 2 ) ) .Branches , otherwise: basicBlockIdx ( 1 ) ) ) , span: span ( 54 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindCall (... func: operandConstant ( constOperand (... span: span ( 60 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindZeroSized , ty: ty ( 24 ) , id: mirConstId ( 7 ) ) ) ) , args: operandConstant ( constOperand (... span: span ( 61 ) , userTy: noUserTypeAnnotationIndex , const: mirConst (... kind: constantKindAllocated ( allocation (... bytes: b"\x00\x00\x00\x00\x00\x00\x00\x00C\x00\x00\x00\x00\x00\x00\x00" , provenance: provenanceMap (... ptrs: provenanceMapEntry (... provSize: 0 , allocId: allocId ( 0 ) ) .ProvenanceMapEntries ) , align: align ( 8 ) , mutability: mutabilityMut ) ) , ty: ty ( 25 ) , id: mirConstId ( 8 ) ) ) ) .Operands , destination: place (... local: local ( 3 ) , projection: .ProjectionElems ) , target: noBasicBlockIdx , unwind: unwindActionUnreachable ) , span: span ( 62 ) ) ) basicBlock (... statements: .Statements , terminator: terminator (... kind: terminatorKindReturn , span: span ( 63 ) ) ) .BasicBlocks , locals: localDecl (... ty: ty ( 1 ) , span: span ( 64 ) , mut: mutabilityMut ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 65 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 26 ) , span: span ( 62 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 23 ) , span: span ( 57 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 21 ) , span: span ( 58 ) , mut: mutabilityNot ) localDecl (... ty: ty ( 27 ) , span: span ( 56 ) , mut: mutabilityMut ) .LocalDecls , argCount: 2 , varDebugInfo: varDebugInfo (... name: symbol ( "lhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 65 ) , scope: sourceScope ( 0 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "self" ) , sourceInfo: sourceInfo (... span: span ( 66 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 1 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 1 ) ) varDebugInfo (... name: symbol ( "rhs" ) , sourceInfo: sourceInfo (... span: span ( 67 ) , scope: sourceScope ( 1 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 2 ) , projection: .ProjectionElems ) ) , argumentIndex: someInt ( 2 ) ) varDebugInfo (... name: symbol ( "a" ) , sourceInfo: sourceInfo (... span: span ( 57 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 4 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) varDebugInfo (... name: symbol ( "b" ) , sourceInfo: sourceInfo (... span: span ( 58 ) , scope: sourceScope ( 2 ) ) , composite: noVarDebugInfoFragment , value: varDebugInfoContentsPlace ( place (... local: local ( 5 ) , projection: .ProjectionElems ) ) , argumentIndex: noInt ) .VarDebugInfos , spreadArg: noLocal , span: span ( 68 ) ) ) ) - ) - - requires // i16 invariants - 0 -Int (1 < i16::MAX) && (a - b < i16::MIN)); -} - -fn unchecked_op(a: i16, b: i16) -> i16 { - let unchecked_res = unsafe { a.unchecked_sub(b) }; - unchecked_res -} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot deleted file mode 100644 index 7dd70579e..000000000 --- a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.dot +++ /dev/null @@ -1,140 +0,0 @@ -digraph { - label="unchecked_sub"; - node [shape=rectangle]; - X5eb86185c1cf8f06_0 [label="_ZN3std2rt19lang_start_in\nternal17h035df9ff6960926a\nE", color=red]; - X3c6542d96320ad67_0 [label="Intr: \nblack_box", color=red]; - X210a8e5fe9313c81_0 [label="_ZN4core9panicking5panic1\n7h37379bf3ce79a0d7E", color=red]; - Xa1fae2d2bbfd50ae_0 [label="_ZN4core9panicking14panic\n_nounwind17h29bb45bec7ac5\nee0E", color=red]; - X8b0ac2e54b9a91_0 [label="NoOp: ", color=red]; - subgraph cluster_0 { - label="std::sys::backtrace::__ru\nst_begin_short_backtrace:\n:"; - style="filled"; - color=lightgray; - X6ed7f5222f8fff3d_0 -> X6ed7f5222f8fff3d_1 [label="_0"]; - X6ed7f5222f8fff3d_0 [label="Call\l"]; - X6ed7f5222f8fff3d_1 -> X6ed7f5222f8fff3d_2 [label="_2"]; - X6ed7f5222f8fff3d_1 [label="Call\l"]; - X6ed7f5222f8fff3d_2 [label="Return\l"]; - } - X6ed7f5222f8fff3d_0 -> X2c1ab9ccb2ee2902_0 [label="_1,const :: ()"]; - X6ed7f5222f8fff3d_1 -> X3c6542d96320ad67_0 [label="const :: ()"]; - subgraph cluster_1 { - label="<() \nas \nstd::process::Termination\n>::report"; - style="filled"; - color=lightgray; - Xb356150a39730498_0 [label="_0 <- Use(const :: std::process::ExitCode)\lReturn\l"]; - } - subgraph cluster_2 { - label="core::num::::unchecked_sub"; - style="filled"; - color=lightgray; - Xe89ce436dda28930_0 -> Xe89ce436dda28930_2 [label="0"]; - Xe89ce436dda28930_0 -> Xe89ce436dda28930_1 [label="other"]; - Xe89ce436dda28930_0 [label="Storage Live _3\l_3 <- UbChecks :: bool\lSwitchInt _3\l"]; - Xe89ce436dda28930_1 -> Xe89ce436dda28930_2 [label="_4"]; - Xe89ce436dda28930_1 [label="Call\l"]; - Xe89ce436dda28930_2 [label="Storage Dead _3\l_0 <- SubUnchecked(_1, _2)\lReturn\l"]; - } - Xe89ce436dda28930_1 -> Xd6d8542b139753eb_0 [label="_1,_2"]; - subgraph cluster_3 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X4d9411a803faadfe_0 -> X4d9411a803faadfe_3 [label="Cleanup"]; - X4d9411a803faadfe_0 -> X4d9411a803faadfe_1 [label="_0"]; - X4d9411a803faadfe_0 [label="_3 <- ReErased (Mut { kind: Default }): _1\lCall\l"]; - X4d9411a803faadfe_1 -> X4d9411a803faadfe_2; - X4d9411a803faadfe_1 [label="Drop _1\l"]; - X4d9411a803faadfe_2 [label="Return\l"]; - X4d9411a803faadfe_3 -> X4d9411a803faadfe_4; - X4d9411a803faadfe_3 [label="Drop _1\l"]; - X4d9411a803faadfe_4 [label="Resume\l"]; - } - X4d9411a803faadfe_0 -> X396121085053712_0 [label="_3,_2"]; - subgraph cluster_4 { - label=">::ca\nll_once"; - style="filled"; - color=lightgray; - X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_1 [label="_0"]; - X2c1ab9ccb2ee2902_0 [label="Call\l"]; - X2c1ab9ccb2ee2902_1 [label="Return\l"]; - } - X2c1ab9ccb2ee2902_0 -> X2c1ab9ccb2ee2902_0: _1 [label=""]; - subgraph cluster_5 { - label="main"; - style="filled"; - color=palegreen; - X4f441ab82149a815_0 -> X4f441ab82149a815_1 [label="_3"]; - X4f441ab82149a815_0 [label="_1 <- Use(const :: i16)\l_2 <- Use(const :: i16)\lCall\l"]; - X4f441ab82149a815_1 -> X4f441ab82149a815_2; - X4f441ab82149a815_1 [label="_6 <- chkd-Sub(_1, _2)\lAssert _6.1 == false\l"]; - X4f441ab82149a815_2 -> X4f441ab82149a815_6 [label="0"]; - X4f441ab82149a815_2 -> X4f441ab82149a815_3 [label="other"]; - X4f441ab82149a815_2 [label="_5 <- Use(_6.0)\l_4 <- Gt(_5, const :: i16)\lSwitchInt _4\l"]; - X4f441ab82149a815_3 -> X4f441ab82149a815_4; - X4f441ab82149a815_3 [label="_9 <- chkd-Sub(_1, _2)\lAssert _9.1 == false\l"]; - X4f441ab82149a815_4 -> X4f441ab82149a815_6 [label="0"]; - X4f441ab82149a815_4 -> X4f441ab82149a815_5 [label="other"]; - X4f441ab82149a815_4 [label="_8 <- Use(_9.0)\l_7 <- Lt(_8, const :: i16)\lSwitchInt _7\l"]; - X4f441ab82149a815_5 [label="Return\l"]; - X4f441ab82149a815_6 [label="Call\l"]; - } - X4f441ab82149a815_0 -> X949dd9980f2a3388_0 [label="_1,_2"]; - X4f441ab82149a815_6 -> X210a8e5fe9313c81_0 [label="const :: &str"]; - subgraph cluster_6 { - label="core::num::::unchecked_sub::prec\nondition_check"; - style="filled"; - color=lightgray; - Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_2 [label="0"]; - Xd6d8542b139753eb_0 -> Xd6d8542b139753eb_1 [label="other"]; - Xd6d8542b139753eb_0 [label="Storage Live _4\lStorage Live _6\l_6 <- chkd-Sub(_1, _2)\l_4 <- Use(_6.0)\l_5 <- Use(_6.1)\lStorage Dead _6\lStorage Dead _4\lSwitchInt _5\l"]; - Xd6d8542b139753eb_1 [label="Call\l"]; - Xd6d8542b139753eb_2 [label="Return\l"]; - } - Xd6d8542b139753eb_1 -> Xa1fae2d2bbfd50ae_0 [label="const :: &str"]; - subgraph cluster_7 { - label="std::rt::lang_start::<()>\n::{closure#0}"; - style="filled"; - color=lightgray; - X396121085053712_0 -> X396121085053712_1 [label="_3"]; - X396121085053712_0 [label="Storage Live _2\lStorage Live _3\lStorage Live _4\l_4 <- Use(_1*.0)\lCall\l"]; - X396121085053712_1 -> X396121085053712_2 [label="_2"]; - X396121085053712_1 [label="Storage Dead _4\lCall\l"]; - X396121085053712_2 [label="Storage Dead _3\lStorage Live _5\l_5 <- ReErased (Shared): _2.0\lStorage Live _6\l_6 <- Use(_2.0.0)\l_0 <- Cast-IntToInt _6\lStorage Dead _6\lStorage Dead _5\lStorage Dead _2\lReturn\l"]; - } - X396121085053712_0 -> X6ed7f5222f8fff3d_0 [label="_4"]; - X396121085053712_1 -> Xb356150a39730498_0 [label="_3"]; - subgraph cluster_8 { - label="std::rt::lang_start::<()>"; - style="filled"; - color=lightgray; - X3d6480ec228be4ec_0 -> X3d6480ec228be4ec_1 [label="_5"]; - X3d6480ec228be4ec_0 [label="Storage Live _5\lStorage Live _6\lStorage Live _8\l_8 <- Closure (_1)\l_7 <- ReErased (Shared): _8\l_6 <- Cast-PointerCoercion(Unsize) _7\lCall\l"]; - X3d6480ec228be4ec_1 [label="Storage Dead _6\l_0 <- Use(_5 as VariantIdx(0).0)\lStorage Dead _8\lStorage Dead _5\lReturn\l"]; - } - X3d6480ec228be4ec_0 -> X5eb86185c1cf8f06_0 [label="_6,_2,_3,_4"]; - subgraph cluster_9 { - label="unchecked_op"; - style="filled"; - color=palegreen; - X949dd9980f2a3388_0 -> X949dd9980f2a3388_1 [label="_0"]; - X949dd9980f2a3388_0 [label="Call\l"]; - X949dd9980f2a3388_1 [label="Return\l"]; - } - X949dd9980f2a3388_0 -> Xe89ce436dda28930_0 [label="_1,_2"]; - subgraph cluster_10 { - label="std::ptr::drop_in_place::\n<{closure@std::rt::lang_s\ntart<()>::{closure#0}}>"; - style="filled"; - color=lightgray; - X7cb88635fb24da5a_0 [label="Return\l"]; - } - subgraph cluster_11 { - label="<{closure@std::rt::lang_s\ntart<()>::{closure#0}} \nas \nstd::ops::FnOnce<()>>::ca\nll_once"; - style="filled"; - color=lightgray; - X41331acabe05b18d_0 -> X41331acabe05b18d_1 [label="_0"]; - X41331acabe05b18d_0 [label="Call\l"]; - X41331acabe05b18d_1 [label="Return\l"]; - } - X41331acabe05b18d_0 -> X4d9411a803faadfe_0 [label="_1*,_2"]; -} diff --git a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json b/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json deleted file mode 100644 index 9559219eb..000000000 --- a/rust-verification-proofs/unchecked_sub/unchecked-sub.smir.json +++ /dev/null @@ -1,2969 +0,0 @@ -{ - "name": "unchecked_sub", - "crate_id": 17961444647620661476, - "allocs": [ - [ - 2, - { - "Memory": { - "bytes": [ - 97, - 115, - 115, - 101, - 114, - 116, - 105, - 111, - 110, - 32, - 102, - 97, - 105, - 108, - 101, - 100, - 58, - 32, - 40, - 97, - 32, - 45, - 32, - 98, - 32, - 62, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 65, - 88, - 41, - 32, - 38, - 38, - 32, - 40, - 97, - 32, - 45, - 32, - 98, - 32, - 60, - 32, - 105, - 49, - 54, - 58, - 58, - 77, - 73, - 78, - 41 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ], - [ - 3, - { - "Memory": { - "bytes": [ - 117, - 110, - 115, - 97, - 102, - 101, - 32, - 112, - 114, - 101, - 99, - 111, - 110, - 100, - 105, - 116, - 105, - 111, - 110, - 40, - 115, - 41, - 32, - 118, - 105, - 111, - 108, - 97, - 116, - 101, - 100, - 58, - 32, - 105, - 49, - 54, - 58, - 58, - 117, - 110, - 99, - 104, - 101, - 99, - 107, - 101, - 100, - 95, - 115, - 117, - 98, - 32, - 99, - 97, - 110, - 110, - 111, - 116, - 32, - 111, - 118, - 101, - 114, - 102, - 108, - 111, - 119 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Not" - } - } - ] - ], - "functions": [ - [ - 20, - { - "IntrinsicSym": "black_box" - } - ], - [ - 13, - { - "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE" - } - ], - [ - 14, - { - "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE" - } - ], - [ - 24, - { - "NormalSym": "_ZN4core9panicking14panic_nounwind17h29bb45bec7ac5ee0E" - } - ], - [ - 36, - { - "NoOpSym": "" - } - ], - [ - 28, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE" - } - ], - [ - 0, - { - "NormalSym": "_ZN3std2rt19lang_start_internal17h035df9ff6960926aE" - } - ], - [ - 33, - { - "NormalSym": "_ZN4core9panicking5panic17h37379bf3ce79a0d7E" - } - ], - [ - 34, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E" - } - ], - [ - 32, - { - "NormalSym": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E" - } - ], - [ - 19, - { - "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE" - } - ], - [ - 30, - { - "NormalSym": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E" - } - ], - [ - 22, - { - "NormalSym": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E" - } - ] - ], - "uneval_consts": [], - "items": [ - { - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h8462df9d7d82d5a9E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>::{closure#0}", - "id": 1, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 14, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 13, - "id": 1 - } - } - }, - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 18, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 14, - "id": 2 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] - } - ] - } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } - } - ] - }, - "span": 23 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - 16 - ] - } - ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 - } - ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 28, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 3, - "mutability": "Mut" - }, - { - "ty": 17, - "span": 16, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 15, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 17, - "mutability": "Mut" - }, - { - "ty": 18, - "span": 22, - "mutability": "Mut" - }, - { - "ty": 9, - "span": 23, - "mutability": "Mut" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - }, - "argument_index": null - }, - { - "name": "self", - "source_info": { - "span": 29, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "self", - "source_info": { - "span": 30, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 3 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_sub4main17h289393681834f0fcE", - "mono_item_kind": { - "MonoItemFn": { - "name": "main", - "id": 8, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 78, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 42, - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 13 - } - } - } - } - ] - }, - "span": 78 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 79, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 213, - 255 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 14 - } - } - } - } - ] - }, - "span": 79 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 76, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 32, - "id": 12 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 80 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 80 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 80 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Constant": { - "span": 82, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 255, - 127 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 15 - } - } - } - ] - } - ] - }, - "span": 81 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 3 - } - } - }, - "span": 81 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 83 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 83 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 83 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Constant": { - "span": 85, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 128 - ], - "provenance": { - "ptrs": [] - }, - "align": 2, - "mutability": "Mut" - } - }, - "ty": 23, - "id": 16 - } - } - } - ] - } - ] - }, - "span": 84 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ] - ], - "otherwise": 5 - } - } - }, - "span": 84 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 87, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 33, - "id": 17 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 58, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 18 - } - } - } - ], - "destination": { - "local": 10, - "projection": [] - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 87 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 88, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 89, - "mutability": "Not" - }, - { - "ty": 23, - "span": 90, - "mutability": "Not" - }, - { - "ty": 23, - "span": 91, - "mutability": "Not" - }, - { - "ty": 21, - "span": 81, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 80, - "mutability": "Mut" - }, - { - "ty": 21, - "span": 84, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 27, - "span": 83, - "mutability": "Mut" - }, - { - "ty": 26, - "span": 87, - "mutability": "Mut" - } - ], - "arg_count": 0, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 89, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 90, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "result", - "source_info": { - "span": 91, - "scope": 3 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 92 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h3ef2edb8fe152149E", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 28, - "id": 9 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub18precondition_check17h8904d8fe90f776d7E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub::precondition_check", - "id": 4, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 0, - 23 - ] - } - ] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 6, - "projection": [ - { - "Field": [ - 1, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 59 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 60, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 24, - "id": 7 - } - } - }, - "args": [ - { - "Constant": { - "span": 61, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 67, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - }, - "align": 8, - "mutability": "Mut" - } - }, - "ty": 25, - "id": 8 - } - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "target": null, - "unwind": "Unreachable" - } - }, - "span": 62 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 63 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 64, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 23, - "span": 65, - "mutability": "Not" - }, - { - "ty": 26, - "span": 62, - "mutability": "Not" - }, - { - "ty": 23, - "span": 57, - "mutability": "Not" - }, - { - "ty": 21, - "span": 58, - "mutability": "Not" - }, - { - "ty": 27, - "span": 56, - "mutability": "Mut" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "lhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 65, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "self", - "source_info": { - "span": 66, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 67, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "a", - "source_info": { - "span": 57, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "b", - "source_info": { - "span": 58, - "scope": 2 - }, - "composite": null, - "value": { - "Place": { - "local": 5, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 68 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h45869926b268a74bE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 69 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 69, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 30, - "id": 10 - } - } - }, - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 16, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 12, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - }, - { - "ty": 31, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h10da4b0d031642beE", - "mono_item_kind": { - "MonoItemFn": { - "name": "<() as std::process::Termination>::report", - "id": 7, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "span": 72, - "user_ty": null, - "const_": { - "kind": { - "Allocated": { - "bytes": [ - 0 - ], - "provenance": { - "ptrs": [] - }, - "align": 1, - "mutability": "Mut" - } - }, - "ty": 17, - "id": 11 - } - } - } - } - ] - }, - "span": 72 - } - ], - "terminator": { - "kind": "Return", - "span": 71 - } - } - ], - "locals": [ - { - "ty": 17, - "span": 73, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 74, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 74, - "scope": 0 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 75 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h6332ec0a6b039743E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>", - "id": 6, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 70 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 70, - "mutability": "Mut" - }, - { - "ty": 29, - "span": 70, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [], - "spread_arg": null, - "span": 70 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std2rt10lang_start17h233dfbd9029fc4f7E", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::rt::lang_start::<()>", - "id": 0, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 0, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 0, - "id": 0 - } - } - }, - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } - ] - } - } - } - ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 - } - ], - "terminator": { - "kind": "Return", - "span": 4 - } - } - ], - "locals": [ - { - "ty": 6, - "span": 8, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 9, - "mutability": "Not" - }, - { - "ty": 6, - "span": 10, - "mutability": "Not" - }, - { - "ty": 8, - "span": 11, - "mutability": "Not" - }, - { - "ty": 9, - "span": 12, - "mutability": "Not" - }, - { - "ty": 10, - "span": 1, - "mutability": "Mut" - }, - { - "ty": 5, - "span": 2, - "mutability": "Mut" - }, - { - "ty": 11, - "span": 2, - "mutability": "Not" - }, - { - "ty": 12, - "span": 3, - "mutability": "Not" - } - ], - "arg_count": 4, - "var_debug_info": [ - { - "name": "main", - "source_info": { - "span": 9, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "argc", - "source_info": { - "span": 10, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "argv", - "source_info": { - "span": 11, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 3, - "projection": [] - } - }, - "argument_index": 3 - }, - { - "name": "sigpipe", - "source_info": { - "span": 12, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 4, - "projection": [] - } - }, - "argument_index": 4 - }, - { - "name": "v", - "source_info": { - "span": 6, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 13 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3num21_$LT$impl$u20$i16$GT$13unchecked_sub17h6184bf4974aa3bf0E", - "mono_item_kind": { - "MonoItemFn": { - "name": "core::num::::unchecked_sub", - "id": 3, - "body": { - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 43 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "NullaryOp": [ - "UbChecks", - 21 - ] - } - ] - }, - "span": 44 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 45, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 22, - "id": 6 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 46 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 48 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "SubUnchecked", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 49 - } - ], - "terminator": { - "kind": "Return", - "span": 47 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 50, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 51, - "mutability": "Not" - }, - { - "ty": 23, - "span": 52, - "mutability": "Not" - }, - { - "ty": 21, - "span": 43, - "mutability": "Mut" - }, - { - "ty": 1, - "span": 46, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "self", - "source_info": { - "span": 51, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "rhs", - "source_info": { - "span": 52, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - } - ], - "spread_arg": null, - "span": 53 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h24791d6c135d559dE", - "mono_item_kind": { - "MonoItemFn": { - "name": "std::sys::backtrace::__rust_begin_short_backtrace::", - "id": 2, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 31, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 19, - "id": 3 - } - } - }, - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 34, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 20, - "id": 5 - } - } - }, - "args": [ - { - "Constant": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 37, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 38, - "mutability": "Not" - }, - { - "ty": 1, - "span": 39, - "mutability": "Not" - } - ], - "arg_count": 1, - "var_debug_info": [ - { - "name": "f", - "source_info": { - "span": 38, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "result", - "source_info": { - "span": 40, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - }, - { - "name": "dummy", - "source_info": { - "span": 41, - "scope": 2 - }, - "composite": null, - "value": { - "Const": { - "span": 32, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 1, - "id": 4 - } - } - }, - "argument_index": 1 - } - ], - "spread_arg": null, - "span": 42 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h79077edb5f05220cE", - "mono_item_kind": { - "MonoItemFn": { - "name": ">::call_once", - "id": 5, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Move": { - "local": 1, - "projection": [] - } - }, - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 69 - } - } - ], - "locals": [ - { - "ty": 1, - "span": 69, - "mutability": "Mut" - }, - { - "ty": 7, - "span": 69, - "mutability": "Not" - }, - { - "ty": 1, - "span": 69, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [], - "spread_arg": 2, - "span": 69 - } - } - }, - "details": null - }, - { - "symbol_name": "_ZN13unchecked_sub12unchecked_op17h47a32006666675c8E", - "mono_item_kind": { - "MonoItemFn": { - "name": "unchecked_op", - "id": 9, - "body": { - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "func": { - "Constant": { - "span": 93, - "user_ty": null, - "const_": { - "kind": "ZeroSized", - "ty": 34, - "id": 19 - } - } - }, - "args": [ - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "ty": 23, - "span": 96, - "mutability": "Mut" - }, - { - "ty": 23, - "span": 97, - "mutability": "Not" - }, - { - "ty": 23, - "span": 98, - "mutability": "Not" - } - ], - "arg_count": 2, - "var_debug_info": [ - { - "name": "a", - "source_info": { - "span": 97, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 1, - "projection": [] - } - }, - "argument_index": 1 - }, - { - "name": "b", - "source_info": { - "span": 98, - "scope": 0 - }, - "composite": null, - "value": { - "Place": { - "local": 2, - "projection": [] - } - }, - "argument_index": 2 - }, - { - "name": "unchecked_sum", - "source_info": { - "span": 99, - "scope": 1 - }, - "composite": null, - "value": { - "Place": { - "local": 0, - "projection": [] - } - }, - "argument_index": null - } - ], - "spread_arg": null, - "span": 100 - } - } - }, - "details": null - } - ], - "types": [ - [ - 21, - { - "RigidTy": "Bool" - } - ], - [ - 6, - { - "RigidTy": { - "Int": "Isize" - } - } - ], - [ - 2, - { - "RigidTy": { - "Int": "I8" - } - } - ], - [ - 16, - { - "RigidTy": { - "Int": "I32" - } - } - ], - [ - 23, - { - "RigidTy": { - "Int": "I16" - } - } - ], - [ - 9, - { - "RigidTy": { - "Uint": "U8" - } - } - ] - ], - "debug": null -} From c396382ddbba48e7647658074b3b2055babe7e4c Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 31 Mar 2025 22:35:02 -0600 Subject: [PATCH 45/84] Workflow torun kmir tests fromdockerhub --- .github/workflows/container-test.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 4542b302b..03cffea5e 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -48,22 +48,24 @@ jobs: test: runs-on: ubuntu-latest - needs: publish-test-image - permissions: - packages: read + # needs: publish-test-image + container: runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 steps: - name: Checkout code uses: actions/checkout@v4 with: submodules: recursive ref: sample-challenge-11-proofs - - name: Start KMIR Container - run: | - docker run --detach --rm --name kmir --tty --interactive ${{ needs.publish-test-image.outputs.image-name }}:ubuntu-jammy-${{ needs.publish-test-image.outputs.kmir-version }}_${{ needs.publish-test-image.outputs.k-version }}-${{ needs.publish-test-image.outputs.short-sha }} - - name: Stream files to Container - run: | - docker cp rust-verification-proofs kmir:/home/kmir/ + # - name: Start KMIR Container + # run: | + # docker run --detach --rm --name kmir --tty --interactive ${{ needs.publish-test-image.outputs.image-name }}:ubuntu-jammy-${{ needs.publish-test-image.outputs.kmir-version }}_${{ needs.publish-test-image.outputs.k-version }}-${{ needs.publish-test-image.outputs.short-sha }} + # - name: Stream files to Container + # run: | + # docker cp rust-verification-proofs kmir:/home/kmir/ - name: kmir Prove run: | cd rust-verification-proofs/unchecked_add - kmir prove run $PWD/unchecked-op-spec.k --proof-dir $PWD/proof + for k_file in */*-spec.k"; do + echo "Running ${k_file}" + kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs + done From e46789f49fbfed85338e9126b5c39f6433e50308 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 11:57:13 -0600 Subject: [PATCH 46/84] Rework test and release workflows. Checkout new repo holding rustc test proofs --- .github/workflows/container-test.yml | 24 +++++------ .github/workflows/release.yml | 1 + .github/workflows/test.yml | 64 ++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 12 deletions(-) diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml index 03cffea5e..0590543a5 100644 --- a/.github/workflows/container-test.yml +++ b/.github/workflows/container-test.yml @@ -49,23 +49,23 @@ jobs: test: runs-on: ubuntu-latest # needs: publish-test-image - container: runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 + # container: runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 steps: - name: Checkout code uses: actions/checkout@v4 with: submodules: recursive ref: sample-challenge-11-proofs - # - name: Start KMIR Container - # run: | - # docker run --detach --rm --name kmir --tty --interactive ${{ needs.publish-test-image.outputs.image-name }}:ubuntu-jammy-${{ needs.publish-test-image.outputs.kmir-version }}_${{ needs.publish-test-image.outputs.k-version }}-${{ needs.publish-test-image.outputs.short-sha }} - # - name: Stream files to Container - # run: | - # docker cp rust-verification-proofs kmir:/home/kmir/ + - name: Start KMIR Container + run: | + docker run --detach --rm --name kmir --tty runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash + - name: Stream files to Container + run: | + docker cp rust-verification-proofs kmir:/home/kmir/ - name: kmir Prove run: | - cd rust-verification-proofs/unchecked_add - for k_file in */*-spec.k"; do - echo "Running ${k_file}" - kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs - done + docker exec -it kmir /bin/bash -l -C 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' + - name: Always stop container + if: always() + run: | + docker stop kmir diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3fc62d6d5..d8456aacf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,7 @@ jobs: echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Build Kmir Container uses: docker/build-push-action@v6 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 954b42609..603e9f5d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -123,3 +123,67 @@ jobs: - name: 'Tear down Docker' if: always() run: docker stop --time 0 mir-smir-ci-${GITHUB_SHA} + + + publish-test-image: + needs: version-bump + runs-on: ubuntu-latest + outputs: + image-name: ${{ steps.set-image-name.outputs.image-name }} + k-version: ${{ steps.set-image-name.outputs.k-version }} + kmir-version: ${{ steps.set-image-name.outputs.kmir-version }} + short-sha: ${{ steps.set-image-name.outputs.short-sha }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Docker ghcr.io Login + uses: docker/login-action@v3.4.0 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3.10.0 + - name: Set Image Name Parameters + id: set-image-name + run: | + echo "image-name=ghcr.io/runtimeverification/mir-semantics/kmir" >> $GITHUB_OUTPUT + echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT + echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT + echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Build Kmir Container + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile.kmir + platforms: linux/amd64 + push: true + build-args: | + K_VERSION=${{ steps.set-image-name.outputs.k-version }} + tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} + + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + repository: runtimeverification/rust-verification-proofs + submodules: recursive + ref: main + path: rust-verification-proofs + - name: Start KMIR Container + run: | + docker run --detach --rm --name kmir --tty runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash + - name: Stream files to Container + run: | + docker cp rust-verification-proofs kmir:/home/kmir/ + - name: kmir Prove + run: | + docker exec -it kmir /bin/bash -l -C 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' + - name: Always stop container + if: always() + run: | + docker stop kmir \ No newline at end of file From ad2f05651dac2baf0fbe05b34d1714ca43b51ad0 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 12:08:45 -0600 Subject: [PATCH 47/84] Make it interactive drop tty, gh does not like that. --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 603e9f5d4..f7f1ea8f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -176,7 +176,7 @@ jobs: path: rust-verification-proofs - name: Start KMIR Container run: | - docker run --detach --rm --name kmir --tty runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash + docker run --detach --rm --interactive --name kmir runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash - name: Stream files to Container run: | docker cp rust-verification-proofs kmir:/home/kmir/ From a9afa99f9c29a2152159537069812ae627f7564f Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 12:11:05 -0600 Subject: [PATCH 48/84] drop the tty from exec command --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7f1ea8f6..4c297f00a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -182,7 +182,7 @@ jobs: docker cp rust-verification-proofs kmir:/home/kmir/ - name: kmir Prove run: | - docker exec -it kmir /bin/bash -l -C 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' + docker exec -i kmir /bin/bash -l -C 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' - name: Always stop container if: always() run: | From b0ccd786ae822b14be51d55a88e4b6681d879e9a Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 12:19:58 -0600 Subject: [PATCH 49/84] Drop to C > c. Remove tty reference --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c297f00a..539c46acb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -182,7 +182,7 @@ jobs: docker cp rust-verification-proofs kmir:/home/kmir/ - name: kmir Prove run: | - docker exec -i kmir /bin/bash -l -C 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' + docker exec -i kmir /bin/bash -l -c 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' - name: Always stop container if: always() run: | From a8172bde0735476ab0fcb340d0dd452552a288e4 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 12:22:37 -0600 Subject: [PATCH 50/84] Drop the old WF move to test.yml --- .github/workflows/container-test.yml | 71 ---------------------------- 1 file changed, 71 deletions(-) delete mode 100644 .github/workflows/container-test.yml diff --git a/.github/workflows/container-test.yml b/.github/workflows/container-test.yml deleted file mode 100644 index 0590543a5..000000000 --- a/.github/workflows/container-test.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Example Test w/ Published Container - -on: - pull_request: - branches: - - master -permissions: - packages: write - -jobs: - publish-test-image: - runs-on: ubuntu-latest - outputs: - image-name: ${{ steps.set-image-name.outputs.image-name }} - k-version: ${{ steps.set-image-name.outputs.k-version }} - kmir-version: ${{ steps.set-image-name.outputs.kmir-version }} - short-sha: ${{ steps.set-image-name.outputs.short-sha }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Docker ghcr.io Login - uses: docker/login-action@v3.4.0 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3.10.0 - - name: Set Image Name Parameters - id: set-image-name - run: | - echo "image-name=ghcr.io/runtimeverification/mir-semantics/kmir" >> $GITHUB_OUTPUT - echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT - echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT - echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - name: Build Kmir Container - uses: docker/build-push-action@v6 - with: - context: . - file: Dockerfile.kmir - platforms: linux/amd64 - push: true - build-args: | - K_VERSION=${{ steps.set-image-name.outputs.k-version }} - tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} - - test: - runs-on: ubuntu-latest - # needs: publish-test-image - # container: runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - ref: sample-challenge-11-proofs - - name: Start KMIR Container - run: | - docker run --detach --rm --name kmir --tty runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash - - name: Stream files to Container - run: | - docker cp rust-verification-proofs kmir:/home/kmir/ - - name: kmir Prove - run: | - docker exec -it kmir /bin/bash -l -C 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' - - name: Always stop container - if: always() - run: | - docker stop kmir From 0a853b94439102da67550fbabdc24a2aab2f2372 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 12:44:13 -0600 Subject: [PATCH 51/84] Updating container images --- .github/workflows/test.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 539c46acb..886119d95 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,7 +125,7 @@ jobs: run: docker stop --time 0 mir-smir-ci-${GITHUB_SHA} - publish-test-image: + publish-kmir-image: needs: version-bump runs-on: ubuntu-latest outputs: @@ -164,7 +164,7 @@ jobs: K_VERSION=${{ steps.set-image-name.outputs.k-version }} tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} - test: + container-test: runs-on: ubuntu-latest steps: - name: Checkout code @@ -176,13 +176,17 @@ jobs: path: rust-verification-proofs - name: Start KMIR Container run: | - docker run --detach --rm --interactive --name kmir runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash - - name: Stream files to Container - run: | - docker cp rust-verification-proofs kmir:/home/kmir/ + docker run --detach --rm -t \ + --name kmir \ + -v $PWD:/workspace -w /workspace \ + -u $(id -u):$(id -g) \ + runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash - name: kmir Prove run: | - docker exec -i kmir /bin/bash -l -c 'pushd rust-verification-proofs/; for k_file in */*-spec.k; do echo "Running ${k_file}"; kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs; done' + for k_file in kmir-proofs/*/*-spec.k; do + echo "Running ${k_file}" + docker exec kmir kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs + done - name: Always stop container if: always() run: | From 1a20f129ddacc17d6e2d286926b93becb3d608c3 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 12:56:54 -0600 Subject: [PATCH 52/84] Updating path references --- .github/workflows/test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 886119d95..fa856ea0f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,6 +126,7 @@ jobs: publish-kmir-image: + name: Publish Kmir Image needs: version-bump runs-on: ubuntu-latest outputs: @@ -165,6 +166,7 @@ jobs: tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} container-test: + name: Conainer Test runs-on: ubuntu-latest steps: - name: Checkout code @@ -183,11 +185,11 @@ jobs: runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash - name: kmir Prove run: | - for k_file in kmir-proofs/*/*-spec.k; do + find rust-verification-proofs -name "*-spec.k" | while read -r k_file; do echo "Running ${k_file}" - docker exec kmir kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs + docker exec kmir kmir prove run "/workspace/${k_file}" --proof-dir "/workspace/$(dirname ${k_file})/proofs" done - name: Always stop container if: always() run: | - docker stop kmir \ No newline at end of file + docker stop kmir From 551abe3459e6f95f69539489918264bd9b510252 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 13:09:04 -0600 Subject: [PATCH 53/84] Drop unused WF. Update to just run a single test for testing --- .github/workflows/test.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa856ea0f..fa5015300 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -124,7 +124,6 @@ jobs: if: always() run: docker stop --time 0 mir-smir-ci-${GITHUB_SHA} - publish-kmir-image: name: Publish Kmir Image needs: version-bump @@ -139,14 +138,17 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + - name: Docker ghcr.io Login uses: docker/login-action@v3.4.0 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3.10.0 + - name: Set Image Name Parameters id: set-image-name run: | @@ -154,6 +156,7 @@ jobs: echo "k-version=$(cat deps/k_release)" >> $GITHUB_OUTPUT echo "kmir-version=$(cat package/version)" >> $GITHUB_OUTPUT echo "short-sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Build Kmir Container uses: docker/build-push-action@v6 with: @@ -176,6 +179,7 @@ jobs: submodules: recursive ref: main path: rust-verification-proofs + - name: Start KMIR Container run: | docker run --detach --rm -t \ @@ -183,12 +187,15 @@ jobs: -v $PWD:/workspace -w /workspace \ -u $(id -u):$(id -g) \ runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash + - name: kmir Prove run: | - find rust-verification-proofs -name "*-spec.k" | while read -r k_file; do - echo "Running ${k_file}" - docker exec kmir kmir prove run "/workspace/${k_file}" --proof-dir "/workspace/$(dirname ${k_file})/proofs" - done + # find rust-verification-proofs -name "*-spec.k" | while read -r k_file; do + # echo "Running ${k_file}" + # docker exec kmir kmir prove run "/workspace/${k_file}" --proof-dir "/workspace/$(dirname ${k_file})/proofs" + # done + docker exec kmir kmir prove run "/workspace/rust-verification-proofs/unchecked_add/unchecked_add-spec.k" --proof-dir "/workspace/rust-verification-proofs/unchecked_add/proofs" + - name: Always stop container if: always() run: | From ebfe300a97c0cabab48d5defe208000b2affc530 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 13:12:20 -0600 Subject: [PATCH 54/84] Use published images to ghcr.io for testing --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fa5015300..f06ed5f33 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -170,6 +170,7 @@ jobs: container-test: name: Conainer Test + needs: publish-kmir-image runs-on: ubuntu-latest steps: - name: Checkout code @@ -186,7 +187,7 @@ jobs: --name kmir \ -v $PWD:/workspace -w /workspace \ -u $(id -u):$(id -g) \ - runtimeverificationinc/kmir:ubuntu-jammy-0.3.112_7.1.229-daf5158 /bin/bash + ${{needs.publish-kmir-image.outputs.image-name}}:ubuntu-jammy-${{needs.publish-kmir-image.outputs.kmir-version }}_${{needs.publish-kmir-image.outputs.k-version }}-${{ needs.publish-kmir-image.outputs.short-sha }} /bin/bash - name: kmir Prove run: | From 8e6f5572f94a2ad57599b6aa2035265c0bfa0f11 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 13:29:48 -0600 Subject: [PATCH 55/84] Reworking execution --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f06ed5f33..0f3adada5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -189,13 +189,13 @@ jobs: -u $(id -u):$(id -g) \ ${{needs.publish-kmir-image.outputs.image-name}}:ubuntu-jammy-${{needs.publish-kmir-image.outputs.kmir-version }}_${{needs.publish-kmir-image.outputs.k-version }}-${{ needs.publish-kmir-image.outputs.short-sha }} /bin/bash - - name: kmir Prove + - name: kmir Prove 'unchecked_add' run: | - # find rust-verification-proofs -name "*-spec.k" | while read -r k_file; do - # echo "Running ${k_file}" - # docker exec kmir kmir prove run "/workspace/${k_file}" --proof-dir "/workspace/$(dirname ${k_file})/proofs" - # done - docker exec kmir kmir prove run "/workspace/rust-verification-proofs/unchecked_add/unchecked_add-spec.k" --proof-dir "/workspace/rust-verification-proofs/unchecked_add/proofs" + docker exec kmir /bin/bash -c 'cd /workspace/rust-verification-proofs/unchecked_add && \ + for spec_file in *-spec.k; do \ + echo "Running ${spec_file}"; \ + kmir prove run "${spec_file}" --proof-dir "./proofs"; \ + done' - name: Always stop container if: always() From 702c28de747da626564af3b7478cd0ad5a27be9f Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 13:37:07 -0600 Subject: [PATCH 56/84] Docker is not consuming the container user env --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f3adada5..730b0fde2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -191,7 +191,7 @@ jobs: - name: kmir Prove 'unchecked_add' run: | - docker exec kmir /bin/bash -c 'cd /workspace/rust-verification-proofs/unchecked_add && \ + docker exec kmir /bin/bash -l -c 'cd /workspace/rust-verification-proofs/unchecked_add && \ for spec_file in *-spec.k; do \ echo "Running ${spec_file}"; \ kmir prove run "${spec_file}" --proof-dir "./proofs"; \ From c60a2fdf9264bf6c19b75bc9ebb4c4404333c039 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 14:00:45 -0600 Subject: [PATCH 57/84] Rework container test --- .github/workflows/test.yml | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 730b0fde2..dabf32964 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,35 +169,30 @@ jobs: tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} container-test: - name: Conainer Test needs: publish-kmir-image runs-on: ubuntu-latest + env: + container_name: "kmir-${{ github.run_id }}" + steps: - - name: Checkout code + - name: Checkout Repository uses: actions/checkout@v4 - with: - repository: runtimeverification/rust-verification-proofs - submodules: recursive - ref: main - path: rust-verification-proofs - - name: Start KMIR Container + - name: Start Tool Container run: | docker run --detach --rm -t \ - --name kmir \ + --name ${{ env.container_name }} \ -v $PWD:/workspace -w /workspace \ -u $(id -u):$(id -g) \ ${{needs.publish-kmir-image.outputs.image-name}}:ubuntu-jammy-${{needs.publish-kmir-image.outputs.kmir-version }}_${{needs.publish-kmir-image.outputs.k-version }}-${{ needs.publish-kmir-image.outputs.short-sha }} /bin/bash - - name: kmir Prove 'unchecked_add' + - name: Run KMIR Verification for all proofs provided run: | - docker exec kmir /bin/bash -l -c 'cd /workspace/rust-verification-proofs/unchecked_add && \ - for spec_file in *-spec.k; do \ - echo "Running ${spec_file}"; \ - kmir prove run "${spec_file}" --proof-dir "./proofs"; \ - done' + for k_file in kmir/src/tests/integration/data/*/*-spec.k; do + echo "Running ${k_file}" + docker exec ${{ env.container_name }} kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs + done - - name: Always stop container + - name: Stop Tool Container if: always() - run: | - docker stop kmir + run: docker stop ${{ env.container_name }} From 74707e1d4ed85435b89c838ae81c3f11e1b7c9b8 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 21:38:34 -0600 Subject: [PATCH 58/84] Updates per PR comments. - Remove publish to ghcr.io - Join jobs, and test on container creation job - Clean .gitignore - Drop original packaging Dockerfile --- .github/workflows/test.yml | 33 ++++++--------------------------- .gitignore | 2 -- Dockerfile | 34 ---------------------------------- 3 files changed, 6 insertions(+), 63 deletions(-) delete mode 100644 Dockerfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dabf32964..a986ef0cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,8 +126,10 @@ jobs: publish-kmir-image: name: Publish Kmir Image - needs: version-bump + needs: [ unit-tests, version-bump ] runs-on: ubuntu-latest + env: + container_name: "kmir-${{ github.run_id }}" outputs: image-name: ${{ steps.set-image-name.outputs.image-name }} k-version: ${{ steps.set-image-name.outputs.k-version }} @@ -139,13 +141,6 @@ jobs: with: submodules: recursive - - name: Docker ghcr.io Login - uses: docker/login-action@v3.4.0 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3.10.0 @@ -163,36 +158,20 @@ jobs: context: . file: Dockerfile.kmir platforms: linux/amd64 - push: true + push: false build-args: | K_VERSION=${{ steps.set-image-name.outputs.k-version }} tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} - container-test: - needs: publish-kmir-image - runs-on: ubuntu-latest - env: - container_name: "kmir-${{ github.run_id }}" - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Start Tool Container + - name: Container Sanity Check run: | docker run --detach --rm -t \ --name ${{ env.container_name }} \ -v $PWD:/workspace -w /workspace \ -u $(id -u):$(id -g) \ - ${{needs.publish-kmir-image.outputs.image-name}}:ubuntu-jammy-${{needs.publish-kmir-image.outputs.kmir-version }}_${{needs.publish-kmir-image.outputs.k-version }}-${{ needs.publish-kmir-image.outputs.short-sha }} /bin/bash - - - name: Run KMIR Verification for all proofs provided - run: | + ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" docker exec ${{ env.container_name }} kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs done - - name: Stop Tool Container - if: always() - run: docker stop ${{ env.container_name }} diff --git a/.gitignore b/.gitignore index fe8dcc4dd..98fe5a7f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ /dist/ __pycache__/ .coverage -kmir/dist -kmir/src/kmir/kdist/kdist-* diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a3b7178cd..000000000 --- a/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG K_VERSION -FROM runtimeverificationinc/kframework-k:ubuntu-jammy-$K_VERSION AS builder - -RUN apt-get update && apt-get install -y \ - curl \ - git \ - gcc \ - g++ \ - make \ - python3 \ - python3-pip \ - python3-venv - -RUN pip3 install poetry - -RUN curl https://sh.rustup.rs -sSfy | sh - -COPY . /app -WORKDIR /app - -RUN make && make dist -RUN cd deps/stable-mir-json && git submodule update --init --recursive && :q - -RUN echo "alias poetry-kmir='poetry -C /app/kmir/ run --'" >> /root/.bashrc - -FROM ubuntu:22.04 - -RUN apt-get update && apt-get install -y \ - python3 \ - python3-pip - -COPY --from=builder /app/kmir/dist/*.whl /app/kmir/dist/ - -RUN pip3 install /app/kmir/dist/*.whl From cdaa79cd8bebc73f9654d99b7655dc84117f3459 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 21:52:24 -0600 Subject: [PATCH 59/84] set load to true, and send image to local daemon --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a986ef0cc..712227e6f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -159,6 +159,7 @@ jobs: file: Dockerfile.kmir platforms: linux/amd64 push: false + load: true build-args: | K_VERSION=${{ steps.set-image-name.outputs.k-version }} tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} From 47dc378431f7a6c544d0aea6be93882de7d9656b Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 22:06:07 -0600 Subject: [PATCH 60/84] Set bash shell to 'login' as container user and should use env of that user --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 712227e6f..e6d967546 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -173,6 +173,6 @@ jobs: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" - docker exec ${{ env.container_name }} kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs + docker exec kmir /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done From c88be89b0eb964e0bcba1db046c91d4f3dcc11c6 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 22:08:46 -0600 Subject: [PATCH 61/84] Rename job --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6d967546..6da948cd7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -124,8 +124,8 @@ jobs: if: always() run: docker stop --time 0 mir-smir-ci-${GITHUB_SHA} - publish-kmir-image: - name: Publish Kmir Image + test-kmir-image: + name: Test Kmir Image needs: [ unit-tests, version-bump ] runs-on: ubuntu-latest env: From d3be337180ad86d52b21ad39fcdc38316857fb46 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Tue, 1 Apr 2025 22:23:59 -0600 Subject: [PATCH 62/84] Set container name from testing. Rename workflow --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6da948cd7..c9fcf1417 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -173,6 +173,6 @@ jobs: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" - docker exec kmir /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done From f1c2fda4d43756eac9069ed48c3d26001e0b357c Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 13:44:10 -0600 Subject: [PATCH 63/84] To Resolve permission and env when running /bin/bash commands -l requires an env profile to consume. Give it one --- Dockerfile.kmir | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile.kmir b/Dockerfile.kmir index 1ca7b2294..d99fc7053 100644 --- a/Dockerfile.kmir +++ b/Dockerfile.kmir @@ -23,9 +23,15 @@ RUN chown -R kmir:kmir deps/stable-mir-json/ USER kmir:kmir WORKDIR /home/kmir +# Set Env variables for Building ENV K_VERSION=${K_VERSION} \ PATH=/home/kmir/.local/bin:/home/kmir/.cargo/bin:$PATH \ force_color_prompt=yes +# Set Env Variables every time a new shell is opened (e.g. when using 'docker exec') +RUN echo "export K_VERSION=${K_VERSION}" >> /home/kmir/.bash_profile && \ + echo "export PATH=/home/kmir/.local/bin:/home/kmir/.cargo/bin:\$PATH" >> /home/kmir/.bash_profile && \ + echo "export force_color_prompt=yes" >> /home/kmir/.bash_profile && \ + echo "source /home/kmir/.bash_profile" >> /home/kmir/.bashrc # install rustup non-interactively and build RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none @@ -42,7 +48,7 @@ RUN cd /deps/stable-mir-json && \ cargo run --bin cargo_stable_mir_json -- $PWD && \ ln -s /home/kmir/.stable-mir-json/release.sh /home/kmir/.local/bin/stable-mir-json && \ cargo clean - +# Fixuid is helpful for 1 time executions of docker containers but is not helpful when relying on `docker exec` ENTRYPOINT ["fixuid", "-q"] CMD printf "%s\n" \ From 97e353698ceeed2ce4c56f7f8709e0abe80e4f3e Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 14:52:25 -0600 Subject: [PATCH 64/84] Update workflow to copy files to container --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c9fcf1417..29c78ff13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -171,6 +171,8 @@ jobs: -v $PWD:/workspace -w /workspace \ -u $(id -u):$(id -g) \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash + # Copy files to workspace + docker cp . ${{ env.container_name }}:/home/kmir/workspace/ for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" From 26588af078f251cfcdab04bc01c834d278072cd0 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 14:52:42 -0600 Subject: [PATCH 65/84] Add a couple comments --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29c78ff13..147e53785 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -166,13 +166,17 @@ jobs: - name: Container Sanity Check run: | + # Start Container docker run --detach --rm -t \ --name ${{ env.container_name }} \ -v $PWD:/workspace -w /workspace \ -u $(id -u):$(id -g) \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash - # Copy files to workspace + + # Copy files to workspace docker cp . ${{ env.container_name }}:/home/kmir/workspace/ + + # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" From fcab8e042a3105382123a55d9ce2399515576858 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 15:21:20 -0600 Subject: [PATCH 66/84] tear down the container --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 147e53785..f802e73f7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -182,3 +182,7 @@ jobs: docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done + - name: Tear Down Container + if: always() + run: docker stop ${{ env.container_name }} + From d0a559fa8bfdfa77d1977a7c7cec775f682f6175 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 16:19:36 -0600 Subject: [PATCH 67/84] - Drop docker cp and just mount the folder to the cp drop location --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f802e73f7..ae225cd4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,12 +169,12 @@ jobs: # Start Container docker run --detach --rm -t \ --name ${{ env.container_name }} \ - -v $PWD:/workspace -w /workspace \ + -v $PWD:/home/kmir/workspace -w /home/kmir/workspace \ -u $(id -u):$(id -g) \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash - # Copy files to workspace - docker cp . ${{ env.container_name }}:/home/kmir/workspace/ + # Copy files to workspace + # docker cp . ${{ env.container_name }}:/home/kmir/workspace/ # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do From f9beb107de2f40aa521c97e5b6d364f982a09d20 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 16:22:13 -0600 Subject: [PATCH 68/84] modified: .github/workflows/release.yml - Updating image tag to drop k_release from tag modified: .github/workflows/test.yml - Droping k_release from tag. --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8456aacf..5fb234086 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,5 +39,5 @@ jobs: push: true build-args: | K_VERSION=${{ steps.set-image-name.outputs.k-version }} - tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }} + tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae225cd4c..c8f838ac1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -162,7 +162,7 @@ jobs: load: true build-args: | K_VERSION=${{ steps.set-image-name.outputs.k-version }} - tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} + tags: ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} - name: Container Sanity Check run: | @@ -171,7 +171,7 @@ jobs: --name ${{ env.container_name }} \ -v $PWD:/home/kmir/workspace -w /home/kmir/workspace \ -u $(id -u):$(id -g) \ - ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}_${{ steps.set-image-name.outputs.k-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash + ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash # Copy files to workspace # docker cp . ${{ env.container_name }}:/home/kmir/workspace/ From 8923df9b11cc819baee076abd9c40ad466ef2e8a Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 16:42:39 -0600 Subject: [PATCH 69/84] modified: .github/workflows/test.yml - Modify the WF to drop mdofying internal container user, rely on internal user and user id set by container manager. - docker cp copies file to the container with the internal user target uid to match internal container env, don't overwork this. - Maintain exec commands to use -l to consume internal user env modified: Dockerfile.kmir --- .github/workflows/test.yml | 6 ++---- Dockerfile.kmir | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c8f838ac1..148d87281 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,17 +169,15 @@ jobs: # Start Container docker run --detach --rm -t \ --name ${{ env.container_name }} \ - -v $PWD:/home/kmir/workspace -w /home/kmir/workspace \ - -u $(id -u):$(id -g) \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash # Copy files to workspace - # docker cp . ${{ env.container_name }}:/home/kmir/workspace/ + docker cp . ${{ env.container_name }}:/home/kmir/workspace/ # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" - docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done - name: Tear Down Container diff --git a/Dockerfile.kmir b/Dockerfile.kmir index d99fc7053..b808c15af 100644 --- a/Dockerfile.kmir +++ b/Dockerfile.kmir @@ -49,7 +49,7 @@ RUN cd /deps/stable-mir-json && \ ln -s /home/kmir/.stable-mir-json/release.sh /home/kmir/.local/bin/stable-mir-json && \ cargo clean # Fixuid is helpful for 1 time executions of docker containers but is not helpful when relying on `docker exec` -ENTRYPOINT ["fixuid", "-q"] +# ENTRYPOINT ["fixuid", "-q"] CMD printf "%s\n" \ "Welcome to kmir, powered by K framework" \ From adc6b0adc68e74988856c55436a0e84e6fd01c43 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 16:53:18 -0600 Subject: [PATCH 70/84] Moving workspace in running container to 'workspace' from '/home/kmir' --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 148d87281..184b1d3b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -168,6 +168,7 @@ jobs: run: | # Start Container docker run --detach --rm -t \ + -w /home/kmir/workspace \ --name ${{ env.container_name }} \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash From 50753dac1fa79e24be9c739c422177f340b6a4be Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 17:02:50 -0600 Subject: [PATCH 71/84] Do we need to create folders before they are written to? --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 184b1d3b8..3937d9428 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -178,6 +178,7 @@ jobs: # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" + mkdir -p $(dirname ${k_file})/proofs docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done From 7b891c4855b3283aa435d4f4515cbbb2e0168d37 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 17:10:18 -0600 Subject: [PATCH 72/84] Revert some testing, and remove 'docker cp' --- .github/workflows/test.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3937d9428..9ce00f68d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -168,18 +168,15 @@ jobs: run: | # Start Container docker run --detach --rm -t \ - -w /home/kmir/workspace \ --name ${{ env.container_name }} \ + -v $PWD:/home/kmir/workspace -w /home/kmir/workspace \ + -u $(id -u):$(id -g) \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash - - # Copy files to workspace - docker cp . ${{ env.container_name }}:/home/kmir/workspace/ - + # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" - mkdir -p $(dirname ${k_file})/proofs - docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done - name: Tear Down Container From 4832103ec22ad5e84bfe82c1d80354a2d17d8623 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 17:39:38 -0600 Subject: [PATCH 73/84] Revert removal of fixuid --- Dockerfile.kmir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.kmir b/Dockerfile.kmir index b808c15af..d99fc7053 100644 --- a/Dockerfile.kmir +++ b/Dockerfile.kmir @@ -49,7 +49,7 @@ RUN cd /deps/stable-mir-json && \ ln -s /home/kmir/.stable-mir-json/release.sh /home/kmir/.local/bin/stable-mir-json && \ cargo clean # Fixuid is helpful for 1 time executions of docker containers but is not helpful when relying on `docker exec` -# ENTRYPOINT ["fixuid", "-q"] +ENTRYPOINT ["fixuid", "-q"] CMD printf "%s\n" \ "Welcome to kmir, powered by K framework" \ From ab896273e51f331abfacd10b2f37dae20c3a46fa Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Wed, 2 Apr 2025 20:43:10 -0600 Subject: [PATCH 74/84] Workdir set for exec commands --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ce00f68d..44f686277 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,14 +169,15 @@ jobs: # Start Container docker run --detach --rm -t \ --name ${{ env.container_name }} \ - -v $PWD:/home/kmir/workspace -w /home/kmir/workspace \ + -v $PWD:/home/kmir/workspace \ + -w /home/kmir/workspace \ -u $(id -u):$(id -g) \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" - docker exec ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + docker exec -w /home/kmir/workspace ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done - name: Tear Down Container From e3691da7db2c490571c3e2de682f04e6a48bfac9 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Fri, 4 Apr 2025 15:55:37 -0600 Subject: [PATCH 75/84] The UID used is generally for the very first created on a system. Lets move it up incase anyone using our contaienr is the first user on their own system --- Dockerfile.kmir | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.kmir b/Dockerfile.kmir index d99fc7053..f319c3906 100644 --- a/Dockerfile.kmir +++ b/Dockerfile.kmir @@ -6,8 +6,8 @@ ARG K_VERSION # create non-root user and adjust UID:GID on start-up # see https://github.com/boxboat/fixuid -RUN addgroup --gid 1000 kmir && \ - adduser -uid 1000 --ingroup kmir --home /home/kmir --shell /bin/bash --disabled-password --gecos "" kmir +RUN addgroup --gid 1111 kmir && \ + adduser -uid 1111 --ingroup kmir --home /home/kmir --shell /bin/bash --disabled-password --gecos "" kmir RUN apt-get install -y curl graphviz python-is-python3 && \ USER=kmir && \ GROUP=kmir && \ From 963931c10499de40e93f9fb05e0629c1f3f188de Mon Sep 17 00:00:00 2001 From: devops Date: Fri, 4 Apr 2025 21:55:53 +0000 Subject: [PATCH 76/84] Set Version: 0.3.113 --- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- package/version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 6996c78ba..873499c05 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.112" +version = "0.3.113" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index 1b91a4cff..adcdd1a34 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.112' +VERSION: Final = '0.3.113' diff --git a/package/version b/package/version index 705bcb8b4..dfbf455e9 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.112 +0.3.113 From a291250174c997d18b7c86245917481634a2a467 Mon Sep 17 00:00:00 2001 From: devops Date: Fri, 4 Apr 2025 21:59:11 +0000 Subject: [PATCH 77/84] Set Version: 0.3.113 --- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- package/version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 6996c78ba..873499c05 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.112" +version = "0.3.113" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index 1b91a4cff..adcdd1a34 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.112' +VERSION: Final = '0.3.113' diff --git a/package/version b/package/version index 705bcb8b4..dfbf455e9 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.112 +0.3.113 From 1ba1efffda1e06dff128daddd089843bad5e6a53 Mon Sep 17 00:00:00 2001 From: devops Date: Mon, 7 Apr 2025 15:27:38 +0000 Subject: [PATCH 78/84] Set Version: 0.3.114 --- kmir/pyproject.toml | 2 +- kmir/src/kmir/__init__.py | 2 +- package/version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kmir/pyproject.toml b/kmir/pyproject.toml index 873499c05..8530c9147 100644 --- a/kmir/pyproject.toml +++ b/kmir/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kmir" -version = "0.3.113" +version = "0.3.114" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/kmir/src/kmir/__init__.py b/kmir/src/kmir/__init__.py index adcdd1a34..05d59162f 100644 --- a/kmir/src/kmir/__init__.py +++ b/kmir/src/kmir/__init__.py @@ -1,3 +1,3 @@ from typing import Final -VERSION: Final = '0.3.113' +VERSION: Final = '0.3.114' diff --git a/package/version b/package/version index dfbf455e9..17101bd68 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -0.3.113 +0.3.114 From 32b9806b2be5b97d4b3419d381961fef00d5567b Mon Sep 17 00:00:00 2001 From: Jost Berthold Date: Tue, 8 Apr 2025 12:22:58 +1000 Subject: [PATCH 79/84] EXPERIMENT set UID:GID in `docker exec` during test --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44f686277..81005f65a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -177,7 +177,11 @@ jobs: # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" - docker exec -w /home/kmir/workspace ${{ env.container_name }} /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + docker exec \ + -w /home/kmir/workspace \ + -u $(id -u):$(id -g) \ + ${{ env.container_name }} \ + /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done - name: Tear Down Container From bbd4e1b8f62e6034a77e6cb8e0ac9a6bc8f96e8a Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 7 Apr 2025 22:12:47 -0600 Subject: [PATCH 80/84] reworking test execution setup with minor tweaks since we rely on fixuid to define our container ids try not loading bash profile --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 81005f65a..973d648fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,10 +169,12 @@ jobs: # Start Container docker run --detach --rm -t \ --name ${{ env.container_name }} \ + --entrypoint /bin/bash \ -v $PWD:/home/kmir/workspace \ -w /home/kmir/workspace \ -u $(id -u):$(id -g) \ - ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} /bin/bash + ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} \ + -c "source /home/kmir/.bash_profile && /bin/bash" # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do @@ -181,7 +183,7 @@ jobs: -w /home/kmir/workspace \ -u $(id -u):$(id -g) \ ${{ env.container_name }} \ - /bin/bash -l -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + /bin/bash -c "source /home/kmir/.bash_profile && kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done - name: Tear Down Container From 3b858b2c13b7df924fe3338e7c040b03de2167d9 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 7 Apr 2025 22:25:33 -0600 Subject: [PATCH 81/84] Remove IDs, drop extra flags, add interative/tty to exec. --- .github/workflows/test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 973d648fe..e1fea5f30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,21 +169,20 @@ jobs: # Start Container docker run --detach --rm -t \ --name ${{ env.container_name }} \ - --entrypoint /bin/bash \ -v $PWD:/home/kmir/workspace \ -w /home/kmir/workspace \ - -u $(id -u):$(id -g) \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} \ - -c "source /home/kmir/.bash_profile && /bin/bash" + /bin/bash # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" docker exec \ + --interactive \ + --tty \ -w /home/kmir/workspace \ - -u $(id -u):$(id -g) \ ${{ env.container_name }} \ - /bin/bash -c "source /home/kmir/.bash_profile && kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + /bin/bash -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" done - name: Tear Down Container From 88b881ea94c6663a0941f0832eb6aac378685182 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 7 Apr 2025 22:40:27 -0600 Subject: [PATCH 82/84] try and see the output of the test to see hwat failed --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1fea5f30..4536368a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -178,11 +178,9 @@ jobs: for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" docker exec \ - --interactive \ - --tty \ -w /home/kmir/workspace \ ${{ env.container_name }} \ - /bin/bash -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs" + /bin/bash -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs 2>&1" done - name: Tear Down Container From c992ef6027e11e02dfa34c99a1d8d925b0985b6d Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 7 Apr 2025 23:04:28 -0600 Subject: [PATCH 83/84] Lets do some debug --- .github/workflows/test.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4536368a9..4b7e4061c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -173,10 +173,19 @@ jobs: -w /home/kmir/workspace \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} \ /bin/bash - + + # Print Some Files + ls -l + ls -l kmir/src/tests/integration/data/ + ls -l kmir/src/tests/integration/data/*/*-spec.k + # Run Tests for k_file in kmir/src/tests/integration/data/*/*-spec.k; do echo "Running ${k_file}" + docker exec \ + -w /home/kmir/workspace \ + ${{ env.container_name }} \ + /bin/bash -c "ls -l $(dirname ${k_file})" docker exec \ -w /home/kmir/workspace \ ${{ env.container_name }} \ From be18c88655df87bb7fdcc561f51236da2067d46f Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 7 Apr 2025 23:24:01 -0600 Subject: [PATCH 84/84] Rework proof folder generation workaround container permissions relative to host --- .github/workflows/test.yml | 45 ++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4b7e4061c..c5f1501d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -166,6 +166,13 @@ jobs: - name: Container Sanity Check run: | + # Create output directories for each test + for k_file in kmir/src/tests/integration/data/*/*-spec.k; do + proof_dir="$(dirname ${k_file})/proofs" + mkdir -p "${proof_dir}" + chmod 777 "${proof_dir}" + done + # Start Container docker run --detach --rm -t \ --name ${{ env.container_name }} \ @@ -173,25 +180,25 @@ jobs: -w /home/kmir/workspace \ ${{ steps.set-image-name.outputs.image-name }}:ubuntu-jammy-${{ steps.set-image-name.outputs.kmir-version }}-${{ steps.set-image-name.outputs.short-sha }} \ /bin/bash - - # Print Some Files - ls -l - ls -l kmir/src/tests/integration/data/ - ls -l kmir/src/tests/integration/data/*/*-spec.k - - # Run Tests - for k_file in kmir/src/tests/integration/data/*/*-spec.k; do - echo "Running ${k_file}" - docker exec \ - -w /home/kmir/workspace \ - ${{ env.container_name }} \ - /bin/bash -c "ls -l $(dirname ${k_file})" - docker exec \ - -w /home/kmir/workspace \ - ${{ env.container_name }} \ - /bin/bash -c "kmir prove run ${k_file} --proof-dir $(dirname ${k_file})/proofs 2>&1" - done - + + # Run all tests in a single exec command to maintain fixuid context + docker exec \ + -w /home/kmir/workspace \ + ${{ env.container_name }} \ + /bin/bash -c ' + for k_file in kmir/src/tests/integration/data/*/*-spec.k; do + echo "Running ${k_file}" + proof_dir="$(dirname ${k_file})/proofs" + if ! kmir prove run "${k_file}" --proof-dir "${proof_dir}" 2>&1; then + echo "Proof failed for ${k_file}" + fi + done + ' + + # Print test results + echo "Test results:" + find kmir/src/tests/integration/data -name "proofs" -type d -exec echo {} >> GITHUB_STEP_SUMMARY \; + - name: Tear Down Container if: always() run: docker stop ${{ env.container_name }}